Search code examples
phplaravellaravel-nova

PHP Laravel Nova returns 404


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 without any 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

What happened? How can I solve this?

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


Solution

  • Add on app/config/app.php

    App\Providers\NovaServiceProvider::class,
    

    inside 'providers'.

    You may need to run these commands later if that doesn't work:

    php artisan nova:publish
    

    And

    php artisan view:clear