diff --git a/app/Http/Controllers/Auth/AbstractLoginController.php b/app/Http/Controllers/Auth/AbstractLoginController.php index b24a1a62..d12ec1fd 100644 --- a/app/Http/Controllers/Auth/AbstractLoginController.php +++ b/app/Http/Controllers/Auth/AbstractLoginController.php @@ -102,11 +102,11 @@ abstract class AbstractLoginController extends Controller $this->auth->guard()->login($user, true); - return JsonResponse::create([ + return new JsonResponse([ 'data' => [ 'complete' => true, 'intended' => $this->redirectPath(), - 'user' => $user->toVueObject(), + 'user' => $user->toReactObject(), ], ]); }