Installation
Requirements
Section titled “Requirements”- PHP 8.2 or later
- Laravel 12 or 13
- For the metrics in production: a Redis server, with the
phpredisextension or thepredis/predispackage. The optional Redis indicator needs the same client.
Install the package
Section titled “Install the package”-
Require the package with Composer:
Terminal window composer require nwidart/laravel-actuatorLaravel package discovery registers
Nwidart\Actuator\ActuatorServiceProvider. You do not need to add it tobootstrap/providers.php.Composer also installs nwidart/laravel-metrics, which records the metrics. It starts at once, into the
defaultRedis connection. Without Redis, the application keeps working, but its requests write a warning to the PHP error log. SetMETRICS_STORE=cacheto use a cache store, orMETRICS_ENABLED=falseto record nothing. See choose a metrics store. -
Check that the health endpoint answers:
Terminal window curl -i http://localhost/actuator/healthHTTP/1.1 200 OKContent-Type: application/json{"status":"UP","groups":["liveness","readiness"]} -
Optional: publish the configuration file to change the defaults:
Terminal window php artisan vendor:publish --tag=actuator-configThis copies the file to
config/actuator.php. The configuration reference describes every key.
Route and configuration caching
Section titled “Route and configuration caching”The package reads exposure, base_path and every middleware key when it registers its
routes. If you run php artisan route:cache or php artisan optimize, rebuild the caches after
you change one of these keys:
php artisan optimize:clearphp artisan optimizeNext steps
Section titled “Next steps”- New to the package? Follow the tutorial.
- Deploying to Kubernetes? See configure Kubernetes probes.
- Exposing more than
health? Read secure the endpoints first.