| Total Complexity | 8 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | trait CrudService |
||
| 6 | { |
||
| 7 | public function index() |
||
| 8 | { |
||
| 9 | return $this->repository->getAll(); |
||
| 10 | } |
||
| 11 | |||
| 12 | public function create(array $attributes) |
||
| 13 | { |
||
| 14 | return $this->repository->create($attributes); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function read($id) |
||
| 20 | } |
||
| 21 | |||
| 22 | public function update(array $attributes, $id) |
||
| 23 | { |
||
| 24 | return $this->repository->update($id, $attributes); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function delete($id) |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getPaginate(int $perPage = null, bool $orderBy = true, array $column = ['*']) |
||
| 33 | { |
||
| 34 | return $this->repository->getPaginate($perPage, $orderBy, $column); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getPaginateWithFilter(array $filters = [], int $perPage = null, bool $orderBy = true, array $column = ['*']) |
||
| 38 | { |
||
| 39 | return $this->repository->getPaginateWithFilter($filters, $perPage, $orderBy, $column); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getAllWithFilter(array $filters = [], bool $orderBy = true, array $column = ['*']) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |