Commit ee85cd22 authored by Silvio Gratani's avatar Silvio Gratani

added where() and with() to EloquentBaseRepository

parent 24d1aeb2
...@@ -191,4 +191,26 @@ abstract class EloquentBaseRepository implements BaseRepository ...@@ -191,4 +191,26 @@ abstract class EloquentBaseRepository implements BaseRepository
{ {
return true; return true;
} }
/**
* @inheritdoc
*/
public function where($field, $value, $operator=null)
{
if (null==$operator) {
$operator='=';
} else {
list($value, $operator) = [$operator, $value];
}
return $this->model->where($field, $operator, $value);
}
/**
* @inheritdoc
*/
public function with($relationships)
{
return $this->model->with($relationships);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment