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