问题
I need to point Nova path to a resouce. So that when a user login, he`ll directed to that particular resource.
I have updated this path in /config/nova.php:
'path' => '/crm/resources/clients'
Now after login, I can see the URL updated. But the page is still Welcome Nova page.
Any idea on this?
回答1:
The path settings in config/nova.php is the URI path where Nova will be accessible from. For example if you set path' => '/crm, then client resource index URL will be /crm/resources/clients instead of /nova/resources/clients. It doesn't control the login redirect path.
You can edit the redirectPath() function in nova/src/Http/Controllers/LoginController.php.
public function redirectPath()
{
return Nova::path() . '/resources/clients';
}
Important : I'm not sure whether editing file under nova folder is a good practice. In future when update the version the changes may override. So please be aware of it.
来源:https://stackoverflow.com/questions/53337077/laravel-nova-point-nova-path-to-resource-page