When we login into laravel application we can get details of logged user through Auth::user()
. But I want to make similar thing for another table for instance when user logs in it also stores information from stores
table and I should be able to access it through Auth2::store()
.
What is the process and can anyone redirect me to the solution
I'm not sure if you're interested in multi-auth?
If the user is related to a store, just do Auth::user()->store
.
Alternatively, you can create a Facade and the method store
that does Auth::user()->store
.