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