1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace App\Repositories\Eloquent;
- use Prettus\Repository\Eloquent\BaseRepository;
- use Prettus\Repository\Criteria\RequestCriteria;
- use App\Repositories\NoticeRepository;
- use App\Models\Notice;
- use App\Validators\NoticeValidator;
- /**
- * Class NoticeRepositoryEloquent.
- *
- * @package namespace App\Repositories\Eloquent;
- */
- class NoticeRepositoryEloquent extends BaseRepository implements NoticeRepository
- {
- /**
- * 查询检索的字段
- *
- * @return string
- */
- protected $fieldSearchable = [
- 'id' => '=',
- 'title' => 'like',
- 'show' => '=',
- ];
- /**
- * Specify Model class name
- *
- * @return string
- */
- public function model()
- {
- return Notice::class;
- }
- /**
- * Specify Validator class name
- *
- * @return mixed
- */
- public function validator()
- {
- return NoticeValidator::class;
- }
- /**
- * Boot up the repository, pushing criteria
- */
- public function boot()
- {
- // $this->pushCriteria(app(RequestCriteria::class));
- }
- }
|