anourvalar / laravel-pulse
Additional cards for Laravel Pulse
Installs: 627
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^8.1
- laravel/pulse: ^1.2
Requires (Dev)
- anourvalar/http-client: ^1.10
- friendsofphp/php-cs-fixer: ^3.26
- orchestra/testbench: ^8.6
- phpstan/phpstan: ^1.10
- psalm/plugin-laravel: ^2.8
- squizlabs/php_codesniffer: ^3.7
README
Installation
composer require anourvalar/laravel-pulse
Schedule (cron)
Add recorder to the config/pulse.php:
AnourValar\LaravelPulse\Recorders\ScheduleRecorder::class => [ 'enabled' => env('PULSE_ANOURVALAR_SCHEDULE_ENABLED', true), 'sample_rate' => env('PULSE_ANOURVALAR_SCHEDULE_SAMPLE_RATE', 1), 'ignore' => [], ],
Add card to the vendor/pulse/dashboard.blade.php:
<livewire:anourvalar.pulse.schedule cols="6" />
HTTP Requests (count & response time)
Add recorder to the config/pulse.php:
AnourValar\LaravelPulse\Recorders\HttpRequestsRecorder::class => [ 'enabled' => env('PULSE_ANOURVALAR_HTTP_REQUESTS_ENABLED', true), 'sample_rate' => env('PULSE_ANOURVALAR_HTTP_REQUESTS_SAMPLE_RATE', 1), 'ignore' => ['#/admin/#', '#/livewire/#'], ],
Add cards to the vendor/pulse/dashboard.blade.php:
<livewire:anourvalar.pulse.http-requests-count cols="6" /> <livewire:anourvalar.pulse.http-requests-avg cols="6" />
Database (queries)
Add recorder to the config/pulse.php:
AnourValar\LaravelPulse\Recorders\DatabaseRecorder::class => [ 'enabled' => env('PULSE_ANOURVALAR_DATABASE_ENABLED', true), 'sample_rate' => env('PULSE_ANOURVALAR_DATABASE_SAMPLE_RATE', 1), 'ignore' => [], ],
Add card to the vendor/pulse/dashboard.blade.php:
<livewire:anourvalar.pulse.database cols="6" />
Ping (Response time & status code)
Add recorder to the config/pulse.php:
AnourValar\LaravelPulse\Recorders\PingRecorder::class => [ 'enabled' => env('PULSE_ANOURVALAR_PING_ENABLED', true), 'urls' => ['/'], ],
Add card to the vendor/pulse/dashboard.blade.php:
<livewire:anourvalar.pulse.ping cols="6" />