Auth::user(), not working #51237
Replies: 6 comments
-
Hey there, thanks for reporting this issue. We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here? Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.
Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue. Thanks! |
Beta Was this translation helpful? Give feedback.
-
It might be challenging to reproduce this bug, but I can add you as a contributor to the project so you can examine the issue. |
Beta Was this translation helpful? Give feedback.
-
`Route::prefix("School")->group(function () { Route::get('get_bills_for_school', [intel::class, 'get_bills_for_school'])->name('get_bills_for_school'); });` ` public function get_bills_for_school()
"status": false, |
Beta Was this translation helpful? Give feedback.
-
@mawuli-agbenyo-creator |
Beta Was this translation helpful? Give feedback.
-
No update?? I also encountered this problem |
Beta Was this translation helpful? Give feedback.
-
Something is really wrong in session management in laravel 11, really breaking the code when shifted from laravel 8 to 11 |
Beta Was this translation helpful? Give feedback.
-
Laravel Version
Laravel Framework 11.0.8
PHP Version
PHP 8.2.7
Database Driver & Version
No response
Description
I can't get the auth user
Auth::user()
To work. This is my third time facing this problem i use the middleware (auth) to protect my route and i can still access them. i have triedphp artisan key:generate php artisan cache:clear php artisan config:clear
I keep gettingNo Auth
Steps To Reproduce
public function register_school(SchoolRegistrationRequest $request)
{
if (Auth::check()) {
return 'OK Auth';
} else {
return 'No Auth';
}
Beta Was this translation helpful? Give feedback.
All reactions