Browse Source

search 为空不搜索

visuddhinanda 1 year ago
parent
commit
0775ac7463
1 changed files with 1 additions and 1 deletions
  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")){