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