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.

19 lines
425 B

  1. <?php
  2. namespace App\Service;
  3. use App\Model\Ad;
  4. class AdService implements AdServiceInterface
  5. {
  6. /**
  7. * 跳转类型、跳转连接、标题、图片地址
  8. */
  9. public function banners()
  10. {
  11. return Ad::query()->select(['id','title','logo','item','src','src2'])
  12. ->where([
  13. 'type' => Ad::TYPE_BANNER,
  14. 'status' => Ad::STATUS_YES
  15. ])->get();
  16. }
  17. }