ShareService.php 577 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Services\Share;
  3. use App\Models\Share;
  4. use App\Repositories\ShareRepository;
  5. class ShareService
  6. {
  7. protected $shareRepository;
  8. public function __construct(ShareRepository $shareRepository)
  9. {
  10. $this->shareRepository = $shareRepository;
  11. }
  12. public function list($where = [], $page = '')
  13. {
  14. //获取列表
  15. $list = $this->shareRepository->getShareData($where, $page);
  16. return $list;
  17. }
  18. public function find($where){
  19. return $this->shareRepository->model()->where($where)->first();
  20. }
  21. }