From 3669dd7e319b40c8ad11f44df4dbefc967a332bf Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Mon, 22 Nov 2021 01:27:14 +0100 Subject: [PATCH] Replace deprecated method from Laravel 6.x --- app/Api/v1/Controllers/Auth/RegisterController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Api/v1/Controllers/Auth/RegisterController.php b/app/Api/v1/Controllers/Auth/RegisterController.php index f20ed6f0..9e388490 100644 --- a/app/Api/v1/Controllers/Auth/RegisterController.php +++ b/app/Api/v1/Controllers/Auth/RegisterController.php @@ -36,7 +36,7 @@ public function register(UserStoreRequest $request) $validated = $request->validated(); event(new Registered($user = $this->create($validated))); - $this->attemptLogin($request); + $this->guard()->login($user); return response()->json([ 'message' => 'account created',