-
Notifications
You must be signed in to change notification settings - Fork 11.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth::user(), not working #51214
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! |
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. |
`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, |
@mawuli-agbenyo-creator |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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';
}
The text was updated successfully, but these errors were encountered: