12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace App\Repositories\Eloquent\Lab;
- use App\Repositories\Criteria\Lab\ScheduleCriteria;
- use App\Repositories\Presenters\Lab\SchedulePresenter;
- use Prettus\Repository\Eloquent\BaseRepository;
- use Prettus\Repository\Criteria\RequestCriteria;
- use App\Contracts\Repositories\Lab\ScheduleRepository;
- use App\Repositories\Models\Lab\Schedule;
- use App\Repositories\Validators\Lab\ScheduleValidator;
- /**
- * Class ScheduleRepositoryEloquent.
- *
- * @package namespace App\Repositories\Eloquent\Lab;
- */
- class ScheduleRepositoryEloquent extends BaseRepository implements ScheduleRepository
- {
- /**
- * Specify Model class name
- *
- * @return string
- */
- public function model()
- {
- return Schedule::class;
- }
- /**
- * Specify Validator class name
- *
- * @return mixed
- */
- public function validator()
- {
- return ScheduleValidator::class;
- }
- /**
- * Boot up the repository, pushing criteria
- */
- public function boot()
- {
- $this->pushCriteria(app(RequestCriteria::class));
- $this->pushCriteria(app(ScheduleCriteria::class));
- $this->setPresenter(SchedulePresenter::class);
- }
- }
|