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();
// bootstrap/app.php
use Errly\LaravelErrly\ErrlyServiceProvider;
return Application::configure(basePath: dirname(__DIR__))
->withExceptions(function (Exceptions $exceptions): void {
// Only configure Errly if the package is installed
if (class_exists(ErrlyServiceProvider::class)) {
ErrlyServiceProvider::configureExceptions($exceptions);
}
})
->create();
use Errly\LaravelErrly\Facades\Errly;
Errly::report(new Exception('Manual 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
# Test general errors
php artisan errly:test
# Test critical errors (database, fatal errors)
php artisan errly:test critical
# Test validation errors (should be ignored)
php artisan errly:test validation
# Test custom errors
php artisan errly:test custom
bash
# Test your Slack integration
php artisan errly:test
# Test specific error types
php artisan errly:test database
php artisan errly:test critical
php artisan errly:test validation
# Run the package test suite
composer test
# Check code quality
composer analyse