You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
447 B

5 years ago
5 years ago
  1. <?php
  2. namespace App\Service\v3\Implementations;
  3. use App\Model\v3\Banner;
  4. use App\Service\v3\Interfaces\BannerServiceInterface;
  5. class BannerService implements BannerServiceInterface
  6. {
  7. public function all($type, $marketId)
  8. {
  9. return Banner::query()
  10. ->where(['type' => $type])
  11. ->whereJsonContains('market_ids', [(string)$marketId])
  12. ->orderBy('sort','desc')
  13. ->get()->toArray();
  14. }
  15. }