| Package Data | |
|---|---|
| Maintainer Username: | motty | 
| Maintainer Contact: | israel@motty.io (Israel Sotomayor) | 
| Package Create Date: | 2015-06-30 | 
| Package Last Update: | 2015-06-30 | 
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-11-01 15:01:48 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 50 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 2 | 
| Total Watchers: | 0 | 
| Total Forks: | 0 | 
| Total Open Issues: | 0 | 
Run the following command from you terminal:
composer require motty/laravel-repository:~0.1.0
or add this to require section in your composer.json file:
"motty/laravel-repository: ~0.1.0"
then run composer update
The following methods are available:
public function all($columns = ['*']);
public function lists($value, $key = null);
public function paginate($perPage = 15, $columns = ['*']);
public function findBy($attribute, $value, $columns = ['*']);
public function findManyBy($attribute, $value, $columns = ['*']);
public function newQuery();
public function with($relations);
public function create(array $attributes);
public function find($id, array $columns = ['*']);
public function update(array $data, $id, $attribute = 'id');
public function delete($ids = null);
public function skipCriteria($status = true);
public function getCriteria();
public function getByCriteria(BaseCriteria $criteria);
public function pushCriteria(BaseCriteria $criteria);
public function applyCriteria();
If you wanna use joins just create them as a criteria and inject it into the repository
Note: this could help with any other complex query