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:
@@ -34,7 +34,7 @@ class WashingMachineController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$machines = WashingMachine::query()->paginate(20);
|
||||
$machines = WashingMachine::query()->get();
|
||||
|
||||
return Response::detect("washing-machines.index", [ "machines" => $machines ]);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class WashingMachineController extends Controller
|
||||
return redirect()->route("washing-machines.store");
|
||||
else { // Else - Add it
|
||||
$machine->save();
|
||||
$machines = WashingMachine::query()->paginate(20);
|
||||
$machines = WashingMachine::query()->get();
|
||||
return redirect()->route("washing-machines.index", ['machines' => $machines]);
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class WashingMachineController extends Controller
|
||||
else { // Else - Change the name
|
||||
$machine->update($data);
|
||||
$machine->save();
|
||||
$machines = WashingMachine::query()->paginate(20);
|
||||
$machines = WashingMachine::query()->get();
|
||||
return redirect()->route("washing-machines.index", ["machines" => $machines]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user