This commit is contained in:
2023-12-02 14:50:41 +05:00
parent a57006caa3
commit 07eb044a2b
2 changed files with 11 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ class RegisterController extends Controller
*/
protected function validator(array $data)
{
$data['phone'] = substr(str_replace(['+', '(', ')', '-', '_'], '', $data['phone']), 3);
$data['phone'] = unMaskPhone($data);
return Validator::make($data, [
'name' => ['required', 'string', 'max:255'],
@@ -81,7 +81,7 @@ class RegisterController extends Controller
{
$user = User::create([
'name' => $data['name'],
'phone' => $data['phone'],
'phone' => unMaskPhone($data['phone']),
'username' => $data['username'],
'password' => Hash::make($data['password']),
'active' => true,