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