A simple Laravel package that provides an endpoint reporting your application's Laravel, PHP, and Node versions to StackReporter.
- PHP 8.2 – 8.4
- Laravel 11 or 12
Install the package with Composer:
composer require grayloon/stack-reporter-laravelThe service provider is registered automatically through Laravel package discovery.
Add your API key to your .env file:
STACKREPORTER_API_KEY=your-secret-api-key-hereOptionally, publish the configuration file:
php artisan vendor:publish --provider="GrayLoon\StackReporter\StackReporterServiceProvider" --tag="config"This creates config/grayloon_stack_reporter.php:
<?php
return [
'api_key' => env('STACKREPORTER_API_KEY'),
];The package registers a single endpoint that accepts POST requests containing your API key.
- POST
/api/v1/stack-reporter- Parameter:
apikey- Your configured API key - Returns: JSON with the application's stack versions
- Rate limit: 60 requests per minute
- Parameter:
curl -X POST https://your-app.com/api/v1/stack-reporter \
-H "Content-Type: application/json" \
-d '{"apikey": "your-secret-api-key-here"}'{
"laravel_version": "12.0.0",
"php_version": "8.4.0",
"node_version": "22.14.0"
}node_version is null when Node isn't installed or can't be run from PHP, such as on AWS Lambda or when exec() is disabled.
| Status | Body | When |
|---|---|---|
| 200 | JSON (above) | The API key matches |
| 401 | Missing API key. |
The request has no apikey |
| 403 | Invalid API key given. |
The apikey doesn't match |
| 429 | Too Many Requests | More than 60 requests in a minute |
| 500 | StackReporter API key is not configured. |
STACKREPORTER_API_KEY isn't set |
The installed package version appears in php artisan about under StackReporter.
composer install
vendor/bin/pestThis package is available under the MIT License.