v1.4.0 - Added category search on the app

Added comments
Fixed code
Fixed pagination still being there without using it
This commit is contained in:
Anders
2020-09-22 10:45:27 +02:00
parent 505ed3710b
commit f95318a8f2
24 changed files with 157 additions and 63 deletions
@@ -31,7 +31,7 @@ class LocationController extends Controller
*/
public function index(Request $request)
{
$locations = Location::query()->paginate(20);
$locations = Location::query()->get();
return Response::detect("locations.index", [ "locations" => $locations ]);
}
@@ -67,7 +67,7 @@ class LocationController extends Controller
return redirect()->route("washing-machines.index");
else { // Else - Add it
$location->save();
$locations = Location::query()->paginate(20);
$locations = Location::query()->get();
return redirect()->route("washing-machines.index", ['locations' => $locations]);//washing-machines.index kan byttes ud med locations.index
}
}
@@ -119,7 +119,7 @@ class LocationController extends Controller
$location->update($data);
$location->save();
$locations = Location::query()->paginate(20);
$locations = Location::query()->get();
return redirect()->route("washing-machines.index", ["locations" => $locations]); //washing-machines.index kan byttes ud med locations.index
}
}