1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Repositories\Eloquent\Course;
- use App\Repositories\Criteria\Course\VideoCriteria;
- use App\Repositories\Presenters\Course\VideoPresenter;
- use Prettus\Repository\Eloquent\BaseRepository;
- use App\Contracts\Repositories\Course\VideoRepository;
- use App\Repositories\Models\Course\Video;
- use App\Repositories\Validators\Course\VideoValidator;
- /**
- * Class CourseVideoRepositoryEloquent.
- *
- * @package namespace App\Repositories\Eloquent;
- */
- class VideoRepositoryEloquent extends BaseRepository implements VideoRepository
- {
- /**
- * Specify Model class name
- *
- * @return string
- */
- public function model()
- {
- return Video::class;
- }
- /**
- * Specify Validator class name
- *
- * @return mixed
- */
- public function validator()
- {
- return VideoValidator::class;
- }
- /**
- * Boot up the repository, pushing criteria
- */
- public function boot()
- {
- $this->pushCriteria(app(VideoCriteria::class));
- $this->setPresenter(VideoPresenter::class);
- }
- }
|