PHP code execution monitoring package for Laravel.
composer require internexus/watcher-laravel
php artisan vendor:publish --provider="Internexus\WatcherLaravel\WatcherServiceProvider"
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,
]
$app->register(\Internexus\WatcherLaravel\WatcherServiceProvider::class);
WATCHER_API_KEY=[project token]
php artisan watcher:test