diff --git a/bin/sync b/bin/sync index 0fc3145..11bed66 100755 --- a/bin/sync +++ b/bin/sync @@ -87,6 +87,10 @@ transform([ line("return redirect()->intended(route('dashboard', absolute: false));", 2) => line('return redirect()->intended($this->redirectToAfterLoggedIn());', 2), ], static fn ($changes) => $files->replaceInFile(array_keys($changes), array_values($changes), "{$workingPath}/src/Http/Controllers/Auth/AuthenticatedSessionController.php")); +transform([ + line('function (User $user) use ($request) {', 3) => line('function ($user) use ($request) {', 3), +], static fn ($changes) => $files->replaceInFile(array_keys($changes), array_values($changes), "{$workingPath}/src/Http/Controllers/Auth/NewPasswordController.php")); + transform([ line("return redirect(route('dashboard', absolute: false));", 2) => line('return redirect($this->redirectToAfterLoggedIn());', 2), ], static fn ($changes) => $files->replaceInFile(array_keys($changes), array_values($changes), "{$workingPath}/src/Http/Controllers/Auth/RegisteredUserController.php")); diff --git a/src/Http/Controllers/Auth/NewPasswordController.php b/src/Http/Controllers/Auth/NewPasswordController.php index 4025bbf..cd9cc58 100644 --- a/src/Http/Controllers/Auth/NewPasswordController.php +++ b/src/Http/Controllers/Auth/NewPasswordController.php @@ -41,7 +41,7 @@ public function store(Request $request): RedirectResponse // database. Otherwise we will parse the error and return the response. $status = Password::reset( $request->only('email', 'password', 'password_confirmation', 'token'), - function (User $user) use ($request) { + function ($user) use ($request) { $user->forceFill([ 'password' => Hash::make($request->password), 'remember_token' => Str::random(60),