laravel/vapor-ui
Deprecated: Vapor UI dashboard for Laravel Vapor apps. Adds an in-app interface to browse/search application logs and view failed queue jobs. Replaced largely by Vapor’s own dashboard; no Laravel 11 support.
Installation Add the package via Composer (though note its deprecated status):
composer require laravel/vapor-ui
Publish the configuration:
php artisan vendor:publish --provider="Laravel\VaporUI\VaporUIServiceProvider"
Configuration
Update .env with your Vapor credentials:
VAPOR_UI_KEY=your_vapor_ui_key
VAPOR_UI_SECRET=your_vapor_ui_secret
Ensure VAPOR_UI_ENABLED=true in .env.
First Use Case
Access the dashboard via /vapor-ui (or your configured route). Authenticate using your Vapor credentials to view logs and failed jobs in real-time.
Log Management
error, info), or keyword.Queue Job Monitoring
pending, processing, failed).Integration with Laravel
single log channel (default in Vapor) for seamless log aggregation.vapor:queue or vapor:queue:work Artisan commands to process jobs, which sync with the UI.Customization
/vapor-ui route in routes/web.php:
Route::middleware(['web', 'auth'])->group(function () {
Route::get('/admin/logs', [VaporUIController::class, 'show']);
});
auth:admin).CI/CD Pipelines
php artisan vapor-ui:check-logs --since=10m
Deprecation Warning
AWS Permissions
vapor:logs:read and vapor:jobs:read permissions. Misconfigured IAM roles may block UI access./vapor-ui/logs for permission errors (e.g., AccessDeniedException).Log Retention
Queue Job Limits
config/vapor-ui.php:
'failed_jobs_per_page' => 100,
Performance
since filters to narrow time ranges:
Route::get('/vapor-ui/logs', [VaporUIController::class, 'show'])->with(['since' => now()->subHours(1)]);
Clear Cache If the UI appears blank, clear Vapor’s cache:
php artisan vapor:cache:clear
Log Level Filtering Filter logs by level in the UI or via the API:
// In a custom controller
$logs = \Laravel\VaporUI\Facades\VaporUI::logs()->level('error');
Environment-Specific Config Use environment variables to toggle the UI per environment:
# .env.production
VAPOR_UI_ENABLED=false
Custom Views
Override the default Blade views in resources/views/vendor/vapor-ui to modify the UI (e.g., add your logo or branding).
API Access The UI exposes a RESTful API for programmatic access. Example:
$failedJobs = \Laravel\VaporUI\Facades\VaporUI::failedJobs()->limit(10)->get();
Add Custom Metrics Extend the dashboard by adding tabs for custom metrics (e.g., database query logs):
// In a service provider
VaporUI::extend(function ($ui) {
$ui->addTab('database', function () {
return view('vendor.vapor-ui.tabs.database');
});
});
Webhook Notifications
Integrate with Slack/PagerDuty by listening to vapor-ui.failed-job events:
\Laravel\VaporUI\Events\FailedJobProcessed::listen(function ($job) {
// Send alert
});
Theming Customize the UI’s Tailwind CSS by publishing assets:
php artisan vendor:publish --tag=vapor-ui-assets
Then override resources/css/vapor-ui.css.
How can I help you explore Laravel packages today?