Skip to content

Commit

Permalink
[add] function to create a new query
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoel Monzon committed Dec 29, 2015
1 parent 03c1c96 commit 6d92297
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

interface RepositoryInterface
{
public function newQuery();

public function all($columns = array('*'));

public function take($limit);
Expand Down

0 comments on commit 6d92297

Please sign in to comment.