PHP code example of musoftware / logger-laravel
1. Go to this page and download the library: Download musoftware/logger-laravel 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/ */
musoftware / logger-laravel example snippets
{filename:app/Exceptions/Handler.php}
use Sentry\Laravel\Integration;
public function register(): void
{
$this->reportable(function (Throwable $e) {
Integration::captureUnhandledException($e);
});
}
use function Sentry\captureException;
try {
$this->functionThatMayFail();
} catch (\Throwable $exception) {
captureException($exception);
}
shell
php artisan sentry:publish --dsn=___PUBLIC_DSN___