lameck/lexcept

"Exceptions Pages Resource"

1.0 2018-04-17 06:32 UTC

README

Exception Pages Resource Laravel 5.^

composer-plugin

Packager para resource de páginas de erros.

401
404
500

Assinatura packgerlist

Instalação

composer require lameck/lexcept

Configuração

Adicione o Provider:

Lameck\Lexcept\LexceptServiceProvider::class
composer dumpautoload

App/Exceptions/Handler.php

Adicione as linhas do packager em function render

if($this->isHttpException($exception)){
    switch ($exception->getStatusCode()) {
        case 401:
            return response()->view('Lameck\Lexcept::errors.401');
            break;   
        case 404:
            return response()->view('Lameck\Lexcept::errors.404');
            break;
        case 500:
            return response()->view('Lameck\Lexcept::errors.500');
            break;                           
    }
}
return parent::render($request, $exception);

Teste: 127.0.0.1:8000/hello


68747470733a2f2f7331342e706f7374696d672e63632f6d79617a34746a78742f6c6578636570742e706e67