zhuchengjie пре 3 година
родитељ
комит
b8931579a1
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      app/Modules/Book/Services/BookConfigService.php

+ 3 - 0
app/Modules/Book/Services/BookConfigService.php

@@ -154,6 +154,9 @@ class BookConfigService
                 ->where('is_enabled', 1)
                 ->get();
             $bids = $free_books->pluck('bid')->all();
+            if(empty($bids)){
+                return [];
+            }
             $book_configs = BookConfig::whereIn('bid', $bids)
                 ->where('is_on_shelf', 2)
                 ->select('bid', 'book_name', 'cover')