Support the ongoing development of Laravel.io →
Authentication Session
Last updated 2 years ago.
0

Did you also change the name of filter in your route before filter?

Last updated 2 years ago.
0

zaalbarxx said:

Did you also change the name of filter in your route before filter?

yes,

Last updated 2 years ago.
0

I have two ideas, but I doubt they will work.

Auth::user()->id;

or even better

Auth::id();

Second one, before trying to access the Auth::user(), make sure the person is logged in with Auth::check(). If the person is not logged in, you will get that error.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

dflow dflow Joined 16 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.