I'm using the new (as of writing this) Laravel Nova 4.0 and the official impersonation trait / implementation.
When I impersonate a user it redirects to the frontend homepage /
. I would like it to redirect to /admin
in general. If I can achieve this, I'd really like to have more granular control which users (based on a simple user type
) go to which route by default.
I can't find anything in the documentation, looking through the code or other questions asked in Nova threads.
config/nova.php
has options as to which URLs you can use when starting/stopping impersonation:
'impersonation' => [
// NOTE: change this from the default '/'
'started' => '/admin',
'stopped' => '/',
],
Because this is loaded as a config file, it's potentially worth noting that you can't use named routes here as the configuration will be bootstrapped in before the routes are defined.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With