diff --git a/src/Repository.php b/src/Repository.php index 287bf88..3d527b8 100644 --- a/src/Repository.php +++ b/src/Repository.php @@ -58,6 +58,15 @@ public function makeModel() return $this->model = $model; } + /** + * Function to return an object of Query Builder + * @return \Illuminate\Database\Eloquent\Builder + */ + public function newQuery() + { + return $this->model->newQuery(); + } + /** * Return all rows of model, select all columns default * @param array $columns diff --git a/src/RepositoryInterface.php b/src/RepositoryInterface.php index cf992af..622ca2c 100644 --- a/src/RepositoryInterface.php +++ b/src/RepositoryInterface.php @@ -3,6 +3,8 @@ interface RepositoryInterface { + public function newQuery(); + public function all($columns = array('*')); public function take($limit);