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