Skip to content

Commit

Permalink
Simplifies api routes stub (#50316)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Feb 29, 2024
1 parent 76c9331 commit 7f84e6e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Illuminate/Foundation/Console/stubs/api-routes.stub
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

use Illuminate\Auth\Middleware\Authenticate;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::get('/user', function (Request $request) {
return $request->user();
})->middleware(Authenticate::using('sanctum'));
})->middleware('auth:sanctum');

0 comments on commit 7f84e6e

Please sign in to comment.