12345678910111213141516171819202122232425 |
- <?php
- namespace App\Repositories\Eloquent;
- use App\Repositories\Contracts\BannerInterface;
- use App\Models\Banner;
- /**
- *
- * @author lilin
- *
- */
- class BannerFacadeRepository extends BaseRepository implements BannerInterface
- {
- public function getList(array $conditions, array $fields, string $sort, int $page, int $limit)
- {
- $result = Banner::query()->where(function($query) use($conditions){
- if (isset($conditions['local_id'])){
- $query->where('local_id', $conditions['local_id']);
- }
- })->orderByRaw($sort)->paginate($limit, $fields);
- return $this->response($result);
- }
- }
|