Turbocharge Laravel Nova by lazy loading resources. Dramatically improves performance for applications with 50+ resources.
shahabzebare/laravel-nova-turbo is a Laravel package for turbocharge laravel nova by lazy loading resources. dramatically improves performance for applications with 50+ resources..
It currently has 2 GitHub stars and 1.410 downloads on Packagist (latest version 1.0.0).
Install it with composer require shahabzebare/laravel-nova-turbo.
Discover more Laravel packages by shahabzebare
or browse all Laravel packages to compare alternatives.
Last updated
🚀 Turbocharge Laravel Nova by lazy loading resources.
If you have 50+ resources, Nova can become slow because it loads and runs authorization checks for ALL resources on every page load. This package fixes that by only loading the resources needed for the current page.
Nova's default behavior on every page load:
authorizedToCreate() for each resourceWith Nova Turbo:
Real-world performance comparison on a Nova installation with 100+ resources:
| Metric | Without Turbo | With Turbo | Improvement | |--------|---------------|------------|-------------| | Server Response Time | 455.58 ms | 186.00 ms | 59% faster | | Resources Loaded | ~100 | 1-5 | 95% reduction |


composer require shahabzebare/laravel-nova-turbo
<?php
namespace App\Providers;
use Laravel\Nova\NovaApplicationServiceProvider;
use Shahabzebare\NovaTurbo\Traits\TurboLoadsResources;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
use TurboLoadsResources;
// ... rest of your provider
}
php artisan nova:turbo-cache
This creates a cache file at bootstrap/cache/nova-turbo.php.
php artisan vendor:publish --tag=nova-turbo-config
# Generate/refresh cache
php artisan nova:turbo-cache
# Clear cache
php artisan nova:turbo-cache --clear
// config/nova-turbo.php
return [
// Skip lazy loading in local environment for development
'auto_refresh_in_dev' => true,
// Paths to scan for Nova resources
'resource_paths' => [
app_path('Nova'),
],
// Auto-regenerate cache when Laravel's cache is cleared (e.g., during deployments)
'regenerate_on_cache_clear' => true,
];
If you have resources outside app/Nova (e.g., in modules), register them:
// In your AppServiceProvider or a module service provider
use Shahabzebare\NovaTurbo\NovaTurbo;
public function boot()
{
NovaTurbo::resources([
\Modules\Order\Nova\Order::class,
\Modules\Customer\Nova\Customer::class,
]);
}
Then re-run php artisan nova:turbo-cache.
The cache is automatically regenerated when you run php artisan cache:clear during deployments (enabled by default via regenerate_on_cache_clear).
If you prefer manual control, add to your deployment script:
php artisan nova:turbo-cache
Typical deployment order:
php artisan config:cache
php artisan route:cache
php artisan cache:clear # Auto-regenerates turbo cache
# OR manually: php artisan nova:turbo-cache
To disable automatic regeneration:
NOVA_TURBO_REGENERATE_ON_CLEAR=false
By default, lazy loading is disabled in local environment (auto_refresh_in_dev = true). This means you can add/modify resources without running the cache command.
For production-like testing locally:
NOVA_TURBO_AUTO_REFRESH=false php artisan serve
MIT License. See LICENSE for details.