Skip to content

Commit

Permalink
use invokable controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed May 15, 2024
1 parent 0f93f14 commit 183c1ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

Route::group(['middleware' => [HandlePrecognitiveRequests::class]], function () {
Route::post('login', [LoginController::class, 'login'])->name('login');
Route::post('register', [RegisterController::class, 'register'])->name('register');
Route::post('profile', [ProfileController::class, 'profile'])->name('profile');
Route::post('password', [PasswordController::class, 'password'])->name('password');
Route::post('register', RegisterController::class)->name('register');
Route::post('profile', ProfileController::class)->name('profile');
Route::post('password', PasswordController::class)->name('password');
});

Route::post('password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])->name('password.email');
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/User/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class PasswordController
{
public function password(UserPasswordRequest $request)
public function __invoke(UserPasswordRequest $request)
{
$user = User::current();

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/User/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ProfileController
{
public function profile(UserProfileRequest $request)
public function __invoke(UserProfileRequest $request)
{
$user = User::current();

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/User/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class RegisterController
{
public function register(UserRegisterRequest $request)
public function __invoke(UserRegisterRequest $request)
{
$user = User::make()
->email($request->email)
Expand Down

0 comments on commit 183c1ca

Please sign in to comment.