Filter nokp without hyphen when register
This commit is contained in:
@@ -38,7 +38,9 @@ class AuthController extends Controller
|
||||
$fields = $validator->validated();
|
||||
|
||||
$convert_ic_to_hyphen = (substr_replace(substr_replace($fields['nokp'], '-', 6, 0), '-', 9, 0));
|
||||
$check_staff = Staff::where('nokp', '=', $convert_ic_to_hyphen)->first();
|
||||
$check_staff = Staff::where('nokp', '=', $convert_ic_to_hyphen)
|
||||
->orWhere('nokp', '=', $fields['nokp'])
|
||||
->first();
|
||||
if($check_staff)
|
||||
{
|
||||
$errors = [
|
||||
@@ -49,7 +51,6 @@ class AuthController extends Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
$currentdate = Carbon::now();
|
||||
$currentdate = $currentdate->toDateString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user