|
|
@ -61,6 +61,10 @@ class HumanResourceController extends Controller |
|
|
|
$data['password'] = md5($request->password); |
|
|
|
$data['password'] = md5($request->password); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(isset($data['username']) && HumanResource::where('username', $data['username'])->where('id', '<>', $id)->exists()){ |
|
|
|
|
|
|
|
return response()->json(['status'=>'failed','message'=>'Username already exists!','code'=>400], 400); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if($humanresource){ |
|
|
|
if($humanresource){ |
|
|
|
$result = $humanresource->update($data); |
|
|
|
$result = $humanresource->update($data); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|