ScheduleApproveRecordRepositoryEloquent.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace App\Repositories\Eloquent\School;
  3. use App\Repositories\Criteria\School\ScheduleApproveRecordCriteria;
  4. use App\Repositories\Presenters\School\ScheduleApproveRecordPresenter;
  5. use Prettus\Repository\Eloquent\BaseRepository;
  6. use Prettus\Repository\Criteria\RequestCriteria;
  7. use App\Contracts\Repositories\School\ScheduleApproveRecordRepository;
  8. use App\Repositories\Models\School\ScheduleApproveRecord;
  9. use App\Repositories\Validators\School\ScheduleApproveRecordValidator;
  10. /**
  11. * Class ScheduleApproveRecordRepositoryEloquent.
  12. *
  13. * @package namespace App\Repositories\Eloquent\School;
  14. */
  15. class ScheduleApproveRecordRepositoryEloquent extends BaseRepository implements ScheduleApproveRecordRepository
  16. {
  17. /**
  18. * Specify Model class name
  19. *
  20. * @return string
  21. */
  22. public function model()
  23. {
  24. return ScheduleApproveRecord::class;
  25. }
  26. /**
  27. * Specify Validator class name
  28. *
  29. * @return mixed
  30. */
  31. public function validator()
  32. {
  33. return ScheduleApproveRecordValidator::class;
  34. }
  35. /**
  36. * Boot up the repository, pushing criteria
  37. */
  38. public function boot()
  39. {
  40. $this->pushCriteria(app(RequestCriteria::class));
  41. $this->pushCriteria(app(ScheduleApproveRecordCriteria::class));
  42. $this->setPresenter(ScheduleApproveRecordPresenter::class);
  43. }
  44. }