internexus/watcher-laravel

PHP code execution monitoring package for Laravel

0.0.2 2021-04-13 17:48 UTC

This package is auto-updated.

Last update: 2024-11-14 01:44:48 UTC


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