Skip to content

Instantly share code, notes, and snippets.

@hannesvdvreken
Created September 28, 2015 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannesvdvreken/80a69d7daf8e222dd4dd to your computer and use it in GitHub Desktop.
Save hannesvdvreken/80a69d7daf8e222dd4dd to your computer and use it in GitHub Desktop.
abstract class AbstractRepository
{
public function __construct(Model $models)
{
$this->models = $models;
}
public function get(array $options = [])
{
if (isset($options['sort'])) {
//...
}
if (isset($options['filters'])) {
//...
}
return $this->models->get();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment