简体   繁体   中英

Laravel Nova how to fix the /nova route not working

I have an laravel -application which has the laravel-nova -adminpanel attached to it. Previously, when I went to the route myapplication.test/nova - I get prompted to the nova login page. Now, on the web.php -file, I added a route like this:

Route::get('{sitemap}', 'SitemapController@show')->name('sitemap.show');

the myapplication.test/nova -route is no longer working and I have no clue why?

Inside the nova.php -file I added 'path' => '/nova/admin', - then it works, but is there are way to avoid this?

First:

Route::get('{sitemap}', 'SitemapController@show')->name('sitemap.show');

This mails all urls like '/test', '/nova', 'test.html' must go to the SitemapController show method.

I don't think you want this, so I think you need to change is to:

Route::get('sitemap', 'SitemapController@show')->name('sitemap.show');

Second: Route are normally cached. So to see the change working be sure to run:

php artisan route:cache

Or use a commend to clear all cache

php artisan optimize:clear

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM