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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user