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

There probably are some packages you can use, but if you think about how you would do something like this you would need to "temporary" log the administrator account out, but also add in something in your session to say you are "impersonating" someone so that you can switch back...

Basically think about you will logout yourself, login as the other user, and then add some items into that session that allows you to logout from the user and back into yourself.

0

Opening another browser should do the trick.

0

You could try using the [sarav multi-auth package] (https://github.com/Sarav-S/Laravel-Multiauth). I have used it and for me it works although for my needs I needed the admin to be authenticated from a different table other than users

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.