PHP code example of enniosousa / server-error-pages

1. Go to this page and download the library: Download enniosousa/server-error-pages 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/ */

    

enniosousa / server-error-pages example snippets

 artisan down

'providers' => [
    EnnioSousa\ServerErrorPages\ServerErrorPagesServiceProvider::class,
];


return [
  '000' => [
          'title' => "000 HTTP ERROR",
          'description' => "Brief description",
          'icon' => "fa fa-cogs green", //icon color options are: green, orange or red
          'button' => [
              'name' => "Try This Page Again",
              'link_to' => "reload", //options are: reload, home or previous
          ],
          'why' => [
              'title' => "What happened?",
              'description' => "Error description"
          ],
          'what_do' => [
              'title' => "What can I do?",
              'visitor' => [
                  'title' => "If you're a site visitor",
                  'description' => "Explanation."
              ],
              'owner' => [
                  'title' => "If you're the site owner",
                  'description' => "Explanation"
              ],
          ],
      ],
];

abort(500, "The server is broken");
abort(403, "You user role does not heave permission to see that.");
bash
php artisan vendor:publish --provider="EnnioSousa\ServerErrorPages\ServerErrorPagesServiceProvider"