v1.3.3 - Added comments and removed code
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user