visuddhinanda преди 2 години
родител
ревизия
b2b42e1469
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      app/Http/Controllers/SentSimController.php

+ 3 - 2
app/Http/Controllers/SentSimController.php

@@ -28,12 +28,13 @@ class SentSimController extends Controller
                     return $this->error("no sent");
                     return $this->error("no sent");
                 }
                 }
                 $table = SentSim::where('sent1',$sentId)
                 $table = SentSim::where('sent1',$sentId)
-                                ->where('sim',">",0.5)
                                 ->orderBy('sim','desc');
                                 ->orderBy('sim','desc');
                 break;
                 break;
         }
         }
+        $table->where('sim','>=',$request->get('sim',0));
         $count = $table->count();
         $count = $table->count();
-        $table->skip($request->get("offset",0))->take($request->get('limit',200));
+        $table->skip($request->get("offset",0))
+              ->take($request->get('limit',20));
         $result = $table->get();
         $result = $table->get();
         if($result){
         if($result){
             return $this->ok(["rows"=>SentSimResource::collection($result),"count"=>$count]);
             return $this->ok(["rows"=>SentSimResource::collection($result),"count"=>$count]);