RecommendService.php 531 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: admin
  5. * Date: 2018/8/20
  6. * Time: 10:42
  7. */
  8. namespace App\Modules\RecommendBook\Services;
  9. use App\Modules\RecommendBook\Models\Recommend;
  10. class RecommendService
  11. {
  12. public static function getRecommendIdsStatic(int $channel, string $type)
  13. {
  14. return Recommend::where([
  15. ['is_show', '=', 1],
  16. ['channel', '=', $channel],
  17. ['subject', '=', $type]
  18. ])->orderBy('sequence', 'asc')
  19. ->pluck('bid')
  20. ->all();
  21. }
  22. }