count() > 0) { $firstJob = DB::table('jobs')->orderBy('available_at', 'asc')->first(); $firstJobAvailableAt = \Carbon\Carbon::parse($firstJob->available_at); $now = \Carbon\Carbon::now(); $diffInMinutes = $firstJobAvailableAt->diffInMinutes($now); if ($diffInMinutes > 5) { Notification::make() ->title('Whoops!') ->body('There are ' . DB::table('jobs')->count() . " jobs in the queue.\nThis could mean that your jobs are not being processed correctly.") ->danger() ->actions([ Action::make('view') ->label('Browse Documentation') ->button() ->url('https://paymenter.org/docs/installation/install#creating-cronjob-and-service', shouldOpenInNewTab: true), ]) ->send(); } } parent::mount(); } }