Browse Source

Replace deprecated method from Laravel 6.x

Bubka 3 năm trước cách đây
mục cha
commit
3669dd7e31
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Api/v1/Controllers/Auth/RegisterController.php

+ 1 - 1
app/Api/v1/Controllers/Auth/RegisterController.php

@@ -36,7 +36,7 @@ class RegisterController extends Controller
         $validated = $request->validated();
         event(new Registered($user = $this->create($validated)));
 
-        $this->attemptLogin($request);
+        $this->guard()->login($user);
 
         return response()->json([
             'message' => 'account created',