All packages
Metrics for Laravel
Artisan commands
Two commands inspect the registry from the CLI:
php artisan metrics:list # every registered key and its class
php artisan metrics:show users # resolve "users" and print its envelope
php artisan metrics:show users --range=MTD- metrics:list — prints every registered key and its resolved class in a table; warns when nothing is registered.
- metrics:show {key} {--range=} — resolves a registered metric and prints its envelope as pretty JSON. --range overrides the metric’s range; an unregistered key exits with a failure code.
+------------------+-----------------------------+
| Key | Metric |
+------------------+-----------------------------+
| registered_users | App\Metrics\RegisteredUsers |
| revenue | App\Metrics\MonthlyRevenue |
+------------------+-----------------------------+php artisan about
The package adds a Metrics section to php artisan about with the registered metric count, the result-cache state (ENABLED or OFF) and the default range.
Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.