Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Jan 21, 2025
1 parent 0088cef commit 4f03061
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bin/sync
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 4f03061

Please sign in to comment.