Open alex-osborn opened 5 years ago
Hey, I tried to do some exploration on the issue.
I discovered than when the routes are cached they don't seem to show up in the Route::getRoutes()->getRoutes()
array in the registerRouteTemplates
function of the TemplatesRepository
. Actually only the nova routes show up in there. They do appear correctly in route:list
and in tinker when I call the function manually. I couldn't really figure out why but I hope this helps.
I'm using a fresh Laravel 5.8 project with Nova 2, this is how the route is registered:
Route::get('/home', 'PageController@index')->template(\App\Nova\Templates\Test::class)->name('home');
Catch the same issue, have any ideas how to fix it? Don't want to lose ability of route caching 😕
+1
still having those issues with Laravel Nova 2.0.11 + nova-page 0.2.3
Any idea to solve this issue guys, please
Just hit this issue myself when deploying this with a project using deployer. It breaks a lot of stuff!
I've even tried limiting down my routes file so it doesn't leverage the middleware, and doesn't define a template but still no joy...
Hit this issue on a new (nova 2.7) project just now.
@voidgraphics The issue still exists with L6.14.0 and Nova 2.10.1
Is there any fix for this yet @voidgraphics ? Really seems a shame to not get this bug fixed. Have the exact same issues as above in Laravel 8 and Nova 3. The package itself is fantastic and super useful.
The Nova Pages tool doesn't load correctly when routes are cached with
php artisan route:cache
.Steps to reproduce:
php artisan route:cache
.php artisan route:clear
.From my debugging, appears as if the original Nova routes are used when caching is enabled which is giving a dependency injection error.