CommentRepositoryEloquent.php 869 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Repositories\Eloquent\Course;
  3. use App\Repositories\Criteria\Course\CommentCriteria;
  4. use App\Repositories\Presenters\Course\CommentPresenter;
  5. use Prettus\Repository\Eloquent\BaseRepository;
  6. use App\Contracts\Repositories\Course\CommentRepository;
  7. use App\Repositories\Models\Course\Comment;
  8. /**
  9. * Class CourseCommentRepositoryEloquent.
  10. *
  11. * @package namespace App\Repositories\Eloquent;
  12. */
  13. class CommentRepositoryEloquent extends BaseRepository implements CommentRepository
  14. {
  15. /**
  16. * Specify Model class name
  17. *
  18. * @return string
  19. */
  20. public function model()
  21. {
  22. return Comment::class;
  23. }
  24. /**
  25. * Boot up the repository, pushing criteria
  26. */
  27. public function boot()
  28. {
  29. $this->pushCriteria(app(CommentCriteria::class));
  30. $this->setPresenter(CommentPresenter::class);
  31. }
  32. }