v1.3.3 - Added comments and removed code

This commit is contained in:
frederikpyt
2020-09-22 08:56:03 +02:00
parent 13197b8be8
commit cc3d78200a
11 changed files with 31 additions and 61 deletions
@@ -154,6 +154,7 @@ class WashingMachineController extends Controller
return redirect()->route("washing-machines.index");
}
//Used for checking if the currently typed washingmachine name is unique. Create version
public function nameCheck(Request $request){
$washing = WashingMachine::query()->where('name', 'LIKE',$request->nameCheck)->where('location_id', '=', $request->location)->get();
if(count($washing) > 0 && $request->nameCheck !== NULL){
@@ -161,6 +162,7 @@ class WashingMachineController extends Controller
}
}
//Used for checking if the currently typed washingmachine name is unique. Edit version
public function nameCheckUpdate(Request $request){
$washing = WashingMachine::query()->where('name', 'LIKE',$request->nameCheck)->where('location_id', '=', $request->location)->where('id', '!=', $request->id)->get();
if(count($washing) > 0 && $request->nameCheck !== NULL){