PHP code example of anlutro / l4-smart-errors

1. Go to this page and download the library: Download anlutro/l4-smart-errors 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/ */

    

anlutro / l4-smart-errors example snippets


// app/start/global.php
App::pushError(function($exception) {
    if (App::runningInConsole() || Config::get('app.debug')) return;
    return Response::view('my-error-view', [...], 500);
});