Przeglądaj źródła

search 为空不搜索

visuddhinanda 2 lat temu
rodzic
commit
0775ac7463
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/Http/Controllers/ChannelController.php

+ 1 - 1
app/Http/Controllers/ChannelController.php

@@ -168,7 +168,7 @@ class ChannelController extends Controller
                 break;
         }
         //处理搜索
-        if($request->has("search")){
+        if(!empty($request->get("search"))){
             $table = $table->where('name', 'like', "%".$request->get("search")."%");
         }
         if($request->has("type")){