Skip to content

Commit

Permalink
Disable route registration if ui disabled
Browse files Browse the repository at this point in the history
Resolves #162
  • Loading branch information
romanzipp committed Dec 5, 2024
1 parent 9acafc2 commit 7412f53
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Providers/QueueMonitorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ public function boot(): void
'queue-monitor'
);

Route::group($this->buildRouteGroupConfig(), function () {
$this->loadRoutesFrom(__DIR__ . '/../../routes/queue-monitor.php');
});
if (config('queue-monitor.ui.enabled')) {
Route::group($this->buildRouteGroupConfig(), function () {
$this->loadRoutesFrom(__DIR__ . '/../../routes/queue-monitor.php');
});
}

// listen to JobQueued event
if (config('queue-monitor.monitor_queued_jobs', true)) {
Expand Down

0 comments on commit 7412f53

Please sign in to comment.