1. Go to this page and download the library: Download errly/laravel-errly library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
errly / laravel-errly example snippets
// bootstrap/app.php
use Errly\LaravelErrly\ErrlyServiceProvider;
return Application::configure(basePath: dirname(__DIR__))
// ... other configuration
->withExceptions(function (Exceptions $exceptions): void {
// Only configure Errly if the package is installed
if (class_exists(ErrlyServiceProvider::class)) {
ErrlyServiceProvider::configureExceptions($exceptions);
}
})
->create();
'heartbeat' => [
'queues' => [
'default' => env('ERRLY_HEARTBEAT_QUEUE_DEFAULT'),
'emails' => env('ERRLY_HEARTBEAT_QUEUE_EMAILS'),
],
// Use a connection other than the default one
'queue_connection' => env('ERRLY_HEARTBEAT_QUEUE_CONNECTION'),
],
use Errly\LaravelErrly\Heartbeat\HeartbeatClient;
use Errly\LaravelErrly\Heartbeat\HeartbeatManager;
app(HeartbeatManager::class)->extend('my-monitor', fn () => new class implements HeartbeatClient {
public function ping(string $check): void
{
// Send the ping. Throw a HeartbeatException if it was not recorded.
}
});
use Errly\LaravelErrly\Facades\Errly;
Errly::report(new Exception('Manual test'));
bash
php artisan errly:test
🚨 **CRITICAL Error in MyApp Production**
🔍 Error Details
Exception: Illuminate\Database\QueryException
Message: SQLSTATE[42S02]: Base table or view not found
File: /app/Http/Controllers/UserController.php
Line: 42
URL: https://myapp.com/users/123
Method: GET
User: [email protected] (ID: 1234)
Environment: production
Server: web-01
📋 Stack Trace
#0 /app/Http/Controllers/UserController.php(42): ...
#1 /app/vendor/laravel/framework/src/...
[... truncated]
bash
php artisan errly:heartbeat-test
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.