Skip to content

Instantly share code, notes, and snippets.

@ianrodrigues
Created June 5, 2017 18:14
Show Gist options
  • Save ianrodrigues/607d40ad8e3ca178896bd84592667b0f to your computer and use it in GitHub Desktop.
Save ianrodrigues/607d40ad8e3ca178896bd84592667b0f to your computer and use it in GitHub Desktop.
<?php
namespace Funceme\PCD\Persistence;
use Doctrine\ORM\EntityRepository;
use Illuminate\Support\Collection;
class EstacaoRepository extends EntityRepository
{
/**
* @param string $cityId
* @return Illuminate\Support\Collection
*/
public function findByCity($cityId)
{
return new Collection($this->findBy(['city' => $cityId]));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment