PHP code example of dissnik / moonshine-queue-dashboard

1. Go to this page and download the library: Download dissnik/moonshine-queue-dashboard library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dissnik / moonshine-queue-dashboard example snippets


use DissNik\MoonShineQueueDashboard\Pages\QueueDashboardPage;

public function menu(): array
{
    return [
        // ... other menu items
        QueueDashboardPage::make(),
    ];
}

return [
    'auto_menu' => true,         // Automatically add to MoonShine menu
    'queues' => ['default'],     // Queues to monitor
    'auto_refresh' => false,     // Enable automatic data refresh
    'refresh_interval' => 10000, // Refresh interval in milliseconds
];

use DissNik\MoonShineQueueDashboard\Components\FailedJobs;

FailedJobs::make();

use DissNik\MoonShineQueueDashboard\Components\QueueMetrics;

QueueMetrics::make();

use DissNik\MoonShineQueueDashboard\Components\QueueMetrics;
use MoonShine\Laravel\Components\Fragment;

Fragment::make([
    QueueMetrics::make(),
])
    ->name('queue_metrics')
shell
php artisan vendor:publish --tag=moonshine-queue-dashboard-config
shell
php artisan vendor:publish --tag=moonshine-queue-dashboard-lang
shell
php artisan vendor:publish --tag=moonshine-queue-dashboard-assets
shell
php artisan vendor:publish --tag=moonshine-queue-dashboard