BlockItemsRepositoryEloquent.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace App\Repositories\Eloquent;
  3. use Prettus\Repository\Eloquent\BaseRepository;
  4. use Prettus\Repository\Criteria\RequestCriteria;
  5. use App\Repositories\BlockItemsRepository;
  6. use App\Models\BlockItems;
  7. use App\Validators\BlockItemsValidator;
  8. /**
  9. * Class BlockItemsRepositoryEloquent.
  10. *
  11. * @package namespace App\Repositories\Eloquent;
  12. */
  13. class BlockItemsRepositoryEloquent extends BaseRepository implements BlockItemsRepository
  14. {
  15. /**
  16. * 查询检索的字段
  17. *
  18. * @return string
  19. */
  20. protected $fieldSearchable = [
  21. 'id' => '=',
  22. ];
  23. /**
  24. * Specify Model class name
  25. *
  26. * @return string
  27. */
  28. public function model()
  29. {
  30. return BlockItems::class;
  31. }
  32. /**
  33. * Specify Validator class name
  34. *
  35. * @return mixed
  36. */
  37. public function validator()
  38. {
  39. return BlockItemsValidator::class;
  40. }
  41. /**
  42. * Boot up the repository, pushing criteria
  43. */
  44. public function boot()
  45. {
  46. // $this->pushCriteria(app(RequestCriteria::class));
  47. }
  48. }