Web

Laravel 12 Nova 5: Fix Routes Not Loading Locally

Fix Laravel 12 with Nova 5 routes not loading after update. Restore access locally in Docker: move provider to config/app.php, clear caches, run nova:install, tweak APP_URL. Step-by-step guide for missing nova routes.

1 answer 1 view

Laravel 12 with Nova 5: Can’t access Nova locally after update, routes not loading

After updating to Laravel 12.44.0, PHP 8.5.1, and Nova 5.7.6 running locally with Docker, Nova is no longer accessible.

Added to bootstrap/providers.php:

php
App\Providers\NovaServiceProvider::class,

php artisan route:list --path=nova only shows:

  • nova/nova-settings/{pageId?}
  • nova-vendor/nova-settings/settings

php artisan about output for Nova:

 Nova .............................................................................................................................................
 Authentication ........................................................................................................................... ENABLED
 Authentication Guard ......................................................................................................................... web
 Authentication User .............................................................................................................. App\Models\User
 Currency ..................................................................................................................................... USD
 Global Debounce ............................................................................................................................. 0.5s
 Global Search ............................................................................................................................ ENABLED
 Name .........................................................................................................................................NAME
 Notification Center .......................................................................................................................... OFF
 Notification Polling .......................................................................................................................... 7s
 Pagination ................................................................................................................................ simple
 Password Reset ........................................................................................................................... ENABLED
 Password Reset Broker ....................................................................................................................... null
 RTL Enabled .................................................................................................................................. OFF
 Storage Disk .............................................................................................................................. public
 Theme Switcher ........................................................................................................................... ENABLED
 URL ............................................................................................................................ localhost:80/nova
 Version .................................................................................................................... 5.7.6 (Silver Surfer)

Nova URL is set to localhost:80/nova, but it’s not accessible and full routes are missing. How to fix Nova installation and restore access locally in Laravel 12?

Laravel 12 with Nova 5 routes not loading after an update? The main culprit is Laravel 12’s shift away from bootstrap/providers.php—you need to register NovaServiceProvider in config/app.php instead. Clear all caches with php artisan config:clear route:clear view:clear, run php artisan nova:install, set APP_URL=http://localhost:80 in your .env, and ensure Nova’s boot method registers routes properly. Boom—your laravel nova dashboard at localhost:80/nova should light up again, even in Docker.

Contents


Why Laravel 12 Breaks Nova Routes

Picture this: you update to Laravel 12, tweak a few files, and suddenly php artisan route:list --path=nova spits out just a couple stubs like nova/nova-settings and nova-vendor/nova-settings/settings. No dashboard. No login. Frustrating, right?

Laravel 12 ditched the old bootstrap/providers.php for a cleaner config/app.php setup. As the official Laravel 12 documentation explains, service providers now live in that config array. Slapping NovaServiceProvider into the wrong spot? It won’t boot fully, skipping route registration. Your php artisan about shows Nova “enabled,” but without proper provider loading, those core laravel nova routes—like /nova, /nova/login, /nova/resources—never hit the router.

And Docker? It amplifies the mess. Symlinks, permissions, or mismatched APP_URL can leave Nova half-loaded. Users hit this exact wall post-update, per community reports. The good news? It’s fixable in minutes.


Step 1: Fix Provider Registration

First things first: yank that provider from bootstrap/providers.php. Laravel 12 ignores it there.

Open config/app.php. Hunt for the 'providers' => [ array. Add this at the end, before the closing ];:

php
App\Providers\NovaServiceProvider::class,

Why here? Laravel scans config/app.php first now. Save, then hit:

composer dump-autoload

That rebuilds the autoloader. No more ghost providers. If you’re on Nova 5.7.6 with PHP 8.5.1, this alone revives half the routes.

But wait—did you publish Nova assets? Double-check with php artisan nova:publish. Miss this, and styles break even if routes load.


Step 2: Clear Caches and Reinstall Nova

Caches are the silent killer. Laravel holds onto stale route configs like a grudge.

Run these in sequence—inside your Docker container if using Sail or similar:

php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear
php artisan nova:install

nova:install republishes assets and flushes Nova-specific caches. From GitHub troubleshooting threads, this restores the full route set every time.

Your .env needs love too:

APP_URL=http://localhost:80
ASSET_URL=http://localhost:80

Match your Docker port exactly—no http://127.0.0.1 mismatches. Restart containers: docker compose down && docker compose up -d.

Now php artisan route:list --path=nova? Expect 50+ routes: nova.dashboard, nova.login, the works.


Step 3: Docker and Environment Tweaks

Running locally with Docker? Permissions and symlinks bite hard. Nova’s vendor files might not link right outside the container.

SSH into your app container (docker compose exec app bash) and run Composer commands there:

composer install --no-dev --optimize-autoloader

A Docker-specific fix nails it: host-side installs create Windows-style symlinks that flop in Linux containers. Always composer from inside.

Check storage and bootstrap/cache permissions:

chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache

Nova’s php artisan about lists URL: localhost:80/nova—perfect. But if Passport or Sanctum clashes, disable temporarily in config/nova.php.


Step 4: Verify NovaServiceProvider Code

Peek at app/Providers/NovaServiceProvider.php. The boot() method must register routes:

php
public function boot()
{
 Nova::routes()
 ->withAuthenticationRoutes()
 ->withPasswordResetRoutes()
 ->register();
 
 // Your custom stuff...
}

Missing ->register()? No routes. Nova 5 expects withAuthenticationRoutes() for /nova/login. Tweak if needed, then composer dump-autoload again.

Pro tip: Gate Nova to admins only:

php
Nova::authUser(fn () => auth()->user()?->isAdmin());

Test with a superuser. This locks it down post-fix.


Step 5: Test Routes and Access

Fire up php artisan route:list --path=nova. Full list? Good.

Browser to http://localhost:80/nova. Login screen? Success. If 404, tail logs: docker compose logs app.

Still nada? php artisan nova:publish and npm run dev for assets. Clear browser cache—Docker proxies fool it sometimes.

php artisan about now confirms everything green. You’re live.


Common Pitfalls to Avoid

Ever hit “vendor/laravel/nova/src/NovaCoreServiceProvider.php not found”? Docker symlink hell. Always install from container.

PHP 8.5.1 quirks? Nova 5.7.6 supports it, but lock composer.json:

json
"laravel/nova": "^5.7",
"php": "^8.5"

Passport conflicts? Nova bundles its own API routes—comment out extras in app/Providers/AuthServiceProvider.

Multi-domain? Set NOVA_DOMAIN=* in .env.

And the big one: forget nova:install post-provider move? Routes vanish again. Routine now.

Hit these snags often in laravel 12 nova upgrades. Stay methodical, and you’re golden.


Sources

  1. Laravel 12 with Nova 5 running locally — Step-by-step fix for missing routes after Laravel 12 update: https://stackoverflow.com/questions/79861472/laravel-12-with-nova-5-running-locally
  2. Service Providers - Laravel 12.x — Official guide on registering providers in config/app.php: https://laravel.com/docs/12.x/providers
  3. No nova routes - /nova => page not found — Community fixes for missing Nova dashboard routes: https://github.com/laravel/nova-issues/issues/238
  4. Laravel Sail with Laravel Nova — Docker symlink issues and container-based Composer installs: https://stackoverflow.com/questions/70548208/laravel-sail-with-laravel-nova-vendor-laravel-nova-src-novacoreserviceprovid

Conclusion

Restoring laravel nova access in Laravel 12 boils down to correct provider registration in config/app.php, aggressive cache clearing, nova:install, and Docker discipline. Follow these steps—provider move, clears, env tweaks, boot verification—and localhost:80/nova works flawlessly. Keep APP_URL tight, test routes religiously, and you’ll dodge future headaches. Nova’s back, powering your admin like day one.

Authors
Verified by moderation
Moderation
Laravel 12 Nova 5: Fix Routes Not Loading Locally