Laravel Nova - Point Nova path to resource page

こ雲淡風輕ζ 提交于 2019-12-14 02:04:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!