2017 © Pedro Peláez
 

library laravel-section-error-views

Multi section error handle views

image

neomusic/laravel-section-error-views

Multi section error handle views

  • Tuesday, July 26, 2016
  • by neomusic
  • Repository
  • 1 Watchers
  • 3 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Section Error Views

This package is usefull if your project have multi sections with different views

for example: In your project you have two sections backend and `frontend, each section have different views for handle error, (*1)

backend -> resources/views/backend/errors, (*2)

frontend -> resources/views/frontend/errors, (*3)

However, if an exception is thrown but not the view exists for that section? Don't worry, (*4)

The generic view will continue to exist, as well as the response in json in case of an API is called, (*5)

install

  • composer require neomusic/laravel-section-error-views
  • go to app/Exceptions/Handler and extends this class with NeoMusic\LaravelSectionErrorViews\Exceptions\SectionHandler
  • implement function sectionRender with your criteria for example:, (*6)

    public function sectionRender($request,Exception $e)
      {
        if($request->is('admin/*')) {
          $this->renderBackoffice($request, $e);
        } else {
          $this->renderFrontend($request, $e);
        }
      }
    

The Versions

26/07 2016

dev-master

9999999-dev

Multi section error handle views

  Sources   Download

MIT

The Requires

 

by Giuseppe Aremare - NeoMusic

laravel exception multi-section backend-error-views frontend-error-views

26/07 2016

1.0.0

1.0.0.0

Multi section error handle views

  Sources   Download

MIT

The Requires

 

by Giuseppe Aremare - NeoMusic

laravel exception multi-section backend-error-views frontend-error-views