Преглед изворни кода

Merge branch 'v0.2' into develop

durong пре 5 година
родитељ
комит
5e80df2ec1
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      app/Repositories/V2/FloorRepository.php

+ 5 - 1
app/Repositories/V2/FloorRepository.php

@@ -23,7 +23,11 @@ class FloorRepository
 
     public function index()
     {
-        return $this->floor->paginate(20);
+        $where = [];
+        if(isset($request['id'])){
+            $where[] = ['id', '=', $request['id']];
+        }
+        return $this->floor->where($where)->orderBy('id', 'asc')->paginate(20);
     }
 
     public function create($request)