1. Go to this page and download the library: Download exceptions-center/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/ */
exceptions-center / laravel example snippets
public function render($request, Throwable $throwable) {
// ...
if($this->shouldReport($throwable)) {
ExceptionSender::make($throwable, $request)->send() ;
}
return parent::render($request, $throwable);
}
/*
|--------------------------------------------------------------------------
| Exceptions' Center environment data
|--------------------------------------------------------------------------
|
| This array is used in the Exception's Center to correctly use the
| sender. These values are not nt to the Exceptions' Center.
*/
'enabled' => env('EXCEPTION_CENTER_ENABLED', false),
/*
* Determine whether the threads are allowed to
* send the request to the Exceptions' Center.
*/
'multithreading' => true,
/*
* Determine whether an error during the sending
* should be saved in the storage/logs/exceptions.log
* file.
*/
'log' => true,
/*
* If you published the ExceptionSender, you need
* to declare the path until the generated file,
* wherever you put it.
*/
'model' => \ExceptionsCenter\Laravel\ExceptionSender::class,
/*
* The exception destination base URL.
*/
'url' => env('EXCEPTION_CENTER_URL'),
],