PHP Laravel Nova returns 404

Asked by At

I'm working on a local laravel-nova project which worked fine the last couple of days. Now all of a sudden, when I try to go to the /nova route I get a 404 error saying Page could not be found. I tried with

php artisan config:cache

but with no luck. I even deleted the vendor-folder and ran composer install and php artisan nova:install but that didn't solve it either.

When I run php artisan route:list I get the error:

Class App\Http\Controllers\Laravel\Nova\Http\Controllers\LoginController does not exist

I mean, seriously - WTF??? I have absolutely no clue what happened?

Does anyone know how to solve this?

My Laravel version is 5.7 and I'm running this app on a Windows 10 machine.

2 Answers

0
Ganesh Khartode On

LoginController This File Add use App\Http\Controllers\Controller;

0
ST80 On

I found it out myself, so just in case other users may have the same problem I'm gonna post an answer.

So, if you may have a route like for example:

Route::get('{subpage}', '[email protected]');

This will return the 404 and you will not be able to access Nova e.g. the dashboard since Nova (from version 1.0.9) is always registering its routes after the application's routes

You will have to change the config/nova.php path to either no/va or simply nova by removing the /

See here for more