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