12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace App\Repositories;
- use App\Models\Report;
- use Prettus\Repository\Eloquent\BaseRepository;
- class ReportRepository extends BaseRepository
- {
-
- public function model()
- {
- return Report::class;
- }
- public function getTypes($type)
- {
- return $this->model->getReportTypes($type);
- }
- public function getReport($where)
- {
- return $this->model->where($where)->first();
- }
- public function addInfo($data)
- {
- return $this->model->create($data);
- }
- public function getCount($where)
- {
- return $this->model->where($where)->count();
- }
- }
|