This package provides exception handler which stores errors in the database.
You can install the package via composer:
composer require winnee0solta/laradblogger
You need to publish and run the migrations with:
php artisan vendor:publish --tag="laradblogger-migrations"
php artisan migrate
(Optionally) You can also publish config with:
php artisan vendor:publish --tag="laradblogger-config"
It creates the config file (config/lapsi.php)
Logging exception to database with App/Exceptions/Handler.php: (Automatic)
use Winnee0solta\Laradblogger\LaradbloggerErrorHandler;
public function register()
{
$this->reportable(function (Throwable $e) {
if (class_exists(LaradbloggerErrorHandler::class)) {
app(LaradbloggerErrorHandler::class)->report($e);
}
});
}
Logging exception to database via try-catch block: (Manual)
use Winnee0solta\Laradblogger\LaradbloggerErrorHandler;
try {
// code that may throw an exception
} catch (Exception $e) {
app(LaradbloggerErrorHandler::class)->report($e);
throw $e;
}
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.