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