| Total Complexity | 8 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | abstract class BaseCrudServices implements BaseCrudServicesInterface |
||
| 7 | { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var \App\Repositories\BaseRepositoryInterface |
||
| 11 | */ |
||
| 12 | protected $repository; |
||
| 13 | |||
| 14 | public function index() |
||
| 17 | } |
||
| 18 | |||
| 19 | public function create(array $attributes) |
||
| 20 | { |
||
| 21 | return $this->repository->create($attributes); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function read($id) |
||
| 25 | { |
||
| 26 | return $this->repository->find($id); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function update(array $attributes, $id) |
||
| 30 | { |
||
| 31 | return $this->repository->update($id, $attributes); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function delete($id) |
||
| 35 | { |
||
| 36 | return $this->repository->delete($id); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getPaginate(int $perPage = null, bool $orderBy = true, array $column = ['*']) |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getPaginateWithFilter( |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getAllWithFilter( |
||
| 54 | array $filters = [], |
||
| 55 | bool $orderBy = true, |
||
| 61 |