12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Repositories\Eloquent\Course;
- use App\Repositories\Criteria\Course\CourseCriteria;
- use App\Repositories\Presenters\Course\CoursePresenter;
- use Prettus\Repository\Eloquent\BaseRepository;
- use Prettus\Repository\Criteria\RequestCriteria;
- use App\Contracts\Repositories\Course\CourseRepository;
- use App\Repositories\Models\Course\Course;
- /**
- * Class CourseRepositoryEloquent.
- *
- * @package namespace App\Repositories\Eloquent;
- */
- class CourseRepositoryEloquent extends BaseRepository implements CourseRepository
- {
- /**
- * Specify Model class name
- *
- * @return string
- */
- public function model()
- {
- return Course::class;
- }
- /**
- * Boot up the repository, pushing criteria
- */
- public function boot()
- {
- $this->pushCriteria(app(RequestCriteria::class));
- $this->pushCriteria(CourseCriteria::class);
- $this->setPresenter(CoursePresenter::class);
- }
- }
|