1. Go to this page and download the library: Download gzoran/laravel-exception 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/ */
gzoran / laravel-exception example snippets
class Handler extends ExceptionHandler
{
use ExceptionHandlerTrait;
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
···
···
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
// return parent::render($request, $exception);
return $this->handlersRender($request, $exception);
}
···