Question: How is it different from loginUsingId
sarfraznawaz2005 opened this issue ยท 4 comments
How is this package special because we can already login somebody else using auth()->loginUsingId()
method ?
Thanks
It's not an issue :)
Some points:
- How do you know how to restore the original user? The logic quite simple but the package is here to simplify the process.
- Controller scaffolding.
- Blades directives.
- Custom events.
- Middleware.
- Extensible
There's also some specific scenarios:
- When you're sending custom analytics dimensions, ad tags or other marketing stuff you probably don't want to keep them when impersonating. You can use blade directives.
- Events can be used to inject specific actions when taking and leaving the impersonation.
- Admin model is different from User model.
But the main usage for us; we are implementing user impersonation on each of our Laravel projects (4 ~ 6 / month). We're smart and we don't want to repeat boring stuff...
@MarceauKa makes lots of sense, that explanation must be on top of package intro/docs so others don't get confused too :)
@sarfraznawaz2005 Point! I keep the issue opened.
Ps: This package was a pair programming training with my associate :)
I second @sarfraznawaz2005 's comment. The concept behind this needs to be at the top. I was looking for same information. I had to sort the issues from Old to New to get here. ๐ Please add this on the top of README
.