code: public function filterBy($key, $value)
  	{
  		return $this->filter(function($item) use ($key, $value)
  		{
  			$itemValue = is_object($item) ? $item->{$key} : $item[$key];
  
  			return $itemValue == $value;
  		});
  	}
docs: Tries to filter items by a key/value pair.
  
  @param  string  $key
  @param  mixed   $value
  @return \Prologue\Support\Collection