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