kreitje/nova-horizon-stats is a Laravel package for a laravel nova card..
It currently has 28 GitHub stars and 178.149 downloads on Packagist (latest version v0.3).
Install it with composer require kreitje/nova-horizon-stats.
Discover more Laravel packages by kreitje
or browse all Laravel packages to compare alternatives.
Last updated
For sites that use Laravel Horizon, this provides a few cards to show stats you will find on /horizon.

You can install the package in to a Laravel app that uses Nova via composer:
composer require kreitje/nova-horizon-stats
In your app/Providers/NovaServiceProvider.php add the cards to the cards method array.
public function cards() {
return [
new \Kreitje\NovaHorizonStats\JobsPastHour,
new \Kreitje\NovaHorizonStats\FailedJobsPastHour,
new \Kreitje\NovaHorizonStats\Processes,
new \Kreitje\NovaHorizonStats\Workload
];
}
You can pass an argument into the classes for how many seconds to automatically refresh. It defaults to the 30 seconds.
public function cards() {
return [
new \Kreitje\NovaHorizonStats\JobsPastHour(5),
new \Kreitje\NovaHorizonStats\FailedJobsPastHour(10),
new \Kreitje\NovaHorizonStats\Processes(15),
new \Kreitje\NovaHorizonStats\Workload(30),
];
}
If you want to change the title of the cards, pass a second argument to the card classes.
public function cards() {
return [
new \Kreitje\NovaHorizonStats\JobsPastHour(5, 'Jobs from the past hour')
];
}
The Workload card allows you to only watch for specific queues running. To only show specific queues, the third parameter takes an array of queue names.
public function cards() {
return [
new \Kreitje\NovaHorizonStats\Workload(5, 'Queue Workload', ['default', 'encoding'])
];
}
The MIT License (MIT). Please see License File for more information.