If this isn't possible is there an easy way to transfer a session from one model to another?
Multiple Auth sessions using different models.
I have two tables, a login and a user table, each with a corresponding model, and the relationship is one to many.
Currently, I am using Auth::guard('login')->attempt() to create a session for the login model, but would like to have a 'sub' session for the user model, so I can have a different session when changing user, while keeping the login session. For this I have tried Auth::guard('user')->login($user), having set up multiple guards.
Is this possible, and if not is there a solution to achieve a similar affect? A major use case for this is for the user model to be compatible with the spatie laravel-permission package.
I found this when searching, but was not sure if it was considering using different models for each session https: //laracasts.com/discuss/channels/laravel/multiple-simultaneous-auth-sessions'
Please or to participate in this conversation.