12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Repositories\Eloquent;
- use App\Contracts\Repositories\ShopRepository;
- use App\Models\Shop;
- use App\Repositories\Criteria\ShopCriteria;
- use App\Repositories\Presenters\ShopPresenter;
- class ShopRepositoryEloquent extends BaseRepository implements ShopRepository
- {
- /**
- * Boot up the repository, pushing criteria.
- *
- * @throws \Prettus\Repository\Exceptions\RepositoryException
- */
- public function boot()
- {
- $this->pushCriteria(app(ShopCriteria::class));
- $this->setPresenter(ShopPresenter::class);
- }
- public function model()
- {
- // TODO: Implement model() method.
- return Shop::class;
- }
- public function validator()
- {
- return null;
- }
- public function searchPage($limit = null)
- {
- return $this->paginate($limit);
- }
- }
|