فهرست منبع

无记录不返回error

visuddhinanda 1 سال پیش
والد
کامیت
97034e260e
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      app/Http/Controllers/CourseController.php

+ 3 - 5
app/Http/Controllers/CourseController.php

@@ -115,11 +115,9 @@ class CourseController extends Controller
                        ->take($request->get('limit',1000));
                        ->take($request->get('limit',1000));
 
 
         $result = $table->get();
         $result = $table->get();
-		if($result){
-			return $this->ok(["rows"=>CourseResource::collection($result),"count"=>$count]);
-		}else{
-			return $this->error("没有查询到数据");
-		}
+
+		return $this->ok(["rows"=>CourseResource::collection($result),"count"=>$count]);
+
     }
     }
     /**
     /**
      * Display a listing of the resource.
      * Display a listing of the resource.