ChannelAdvertService.php 557 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2018/3/22
  6. * Time: 下午6:00
  7. */
  8. namespace App\Modules\Channel\Services;
  9. use App\Modules\Channel\Models\ChannelAdvert;
  10. use DB;
  11. class ChannelAdvertService
  12. {
  13. static function getAdvertList($distribution_id,$release_type)
  14. {
  15. return ChannelAdvert::where('status',1)
  16. ->where('distribution_id',$distribution_id)
  17. ->where('release_type',$release_type)
  18. ->select('id','photo as banner_url','activity_id','type','content')
  19. ->get();
  20. }
  21. }