internexus / watcher-laravel
PHP code execution monitoring package for Laravel
0.0.2
2021-04-13 17:48 UTC
Requires
- php: ^7.0|^8.0
- internexus/watcher-php: 0.0.2
- laravel/framework: ^7.0|^8.0
Requires (Dev)
- orchestra/testbench: ^6.16
README
PHP code execution monitoring package for Laravel.
Install
composer require internexus/watcher-laravel
Publish config
php artisan vendor:publish --provider="Internexus\WatcherLaravel\WatcherServiceProvider"
Middleware
Attach the WebMonitoringMiddleware on app/Http/Kernel.php
:
/** * The application's route middleware groups. * * @var array */ protected $middlewareGroups = [ 'web' => [ ..., \Internexus\WatcherLaravel\Middleware\WebRequestMonitoring::class, ], 'api' => [ ..., \Internexus\WatcherLaravel\Middleware\WebRequestMonitoring::class, ]
For Lumen
$app->register(\Internexus\WatcherLaravel\WatcherServiceProvider::class);
Configure the .env variable
WATCHER_API_KEY=[project token]
Check your environment
php artisan watcher:test