From f5e1ff198e4442ca79d3149809dbfa05db582377 Mon Sep 17 00:00:00 2001 From: Moradi Date: Sat, 15 Mar 2025 14:41:15 +0330 Subject: [PATCH] register method assign user role with web guard (default) I change it to api guard. --- app/Http/Controllers/Api/Auth/RegisterController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/Auth/RegisterController.php b/app/Http/Controllers/Api/Auth/RegisterController.php index c2f24899..2d7d43e3 100644 --- a/app/Http/Controllers/Api/Auth/RegisterController.php +++ b/app/Http/Controllers/Api/Auth/RegisterController.php @@ -30,7 +30,7 @@ class RegisterController extends Controller $user->medical_center_id = $request->medical_center_id; $user->password = bcrypt($request->password); $user->save(); - $user->assignRole('User'); + $user->assignRole('User','api'); return response()->json($user, 200); }