Browse Source

Merge branch 'v0.2' into develop

durong 5 years ago
parent
commit
5e80df2ec1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/Repositories/V2/FloorRepository.php

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

@@ -23,7 +23,11 @@ class FloorRepository
 
 
     public function index()
     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)
     public function create($request)