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