Skip to content

Commit

Permalink
Merge pull request #10 from pinkary-project/fix/rename-password-contr…
Browse files Browse the repository at this point in the history
…oller

change: rename `PasswordController` to `UpdatePasswordController`.
  • Loading branch information
nunomaduro authored Mar 20, 2024
2 parents 59aef53 + c2a95f9 commit 9bdd96b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules\Password;

final readonly class PasswordController
final readonly class UpdatePasswordController
{
/**
* Update the user's password.
*/
public function update(Request $request): RedirectResponse
public function __invoke(Request $request): RedirectResponse
{
$user = $request->user();
assert($user instanceof User);
Expand Down
4 changes: 2 additions & 2 deletions routes/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use App\Http\Controllers\Auth\EmailVerificationNotificationController;
use App\Http\Controllers\Auth\EmailVerificationPromptController;
use App\Http\Controllers\Auth\NewPasswordController;
use App\Http\Controllers\Auth\PasswordController;
use App\Http\Controllers\Auth\PasswordResetLinkController;
use App\Http\Controllers\Auth\RegisteredUserController;
use App\Http\Controllers\Auth\UpdatePasswordController;
use App\Http\Controllers\Auth\VerifyEmailController;
use Illuminate\Support\Facades\Route;

Expand Down Expand Up @@ -54,7 +54,7 @@

Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);

Route::put('password', [PasswordController::class, 'update'])->name('password.update');
Route::put('password', UpdatePasswordController::class)->name('password.update');

Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
->name('logout');
Expand Down

0 comments on commit 9bdd96b

Please sign in to comment.