Laravel Nova how to fix the /nova route not working

2.3k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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