2017 © Pedro Peláez
 

library tumble

for when it all comes tumbling down...

image

radweb/tumble

for when it all comes tumbling down...

  • Monday, January 25, 2016
  • by danharper
  • Repository
  • 8 Watchers
  • 1 Stars
  • 133 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

, (*1)

Latest Stable Version License, (*2)

Tumble

for when it all comes tumbling down..., (*3)

A collection of Exceptions roughly mapping to HTTP response status codes., (*4)

Also comes with a JSON formatter middleware for Laravel 5.x, (*5)

Usage

If your entire application serves JSON (i.e. it's entirely an API) you can use this as an application-level Middleware. Add to your Kernel:, (*6)

 protected $middleware = [
  // ...
  \Radweb\Tumble\FormatExceptionsMiddleware::class,
  // ...
];

If only a portion of your application serves JSON (i.e. you also have HTML views) you can use this a Route Middleware. Add to your Kernel:, (*7)

 protected $routeMiddleware = [
  // ...
  'jsonExceptions' => \Radweb\Tumble\FormatExceptionsMiddleware::class,
  // ...
];

Then add the Middleware to your routes:, (*8)

Route::group(['prefix' => '/api', 'middleware' => ['jsonExceptions']], function() {
  Route::get('/', function() {
    // ...
  });
});

The Versions

25/01 2016

dev-master

9999999-dev

for when it all comes tumbling down...

  Sources   Download

MIT

The Development Requires

25/01 2016

1.1.1

1.1.1.0

for when it all comes tumbling down...

  Sources   Download

MIT

The Development Requires

18/01 2016

1.1.0

1.1.0.0

for when it all comes tumbling down...

  Sources   Download

MIT

The Development Requires

16/10 2015

1.0.0

1.0.0.0

for when it all comes tumbling down...

  Sources   Download

MIT

The Development Requires

07/07 2015

0.1.0

0.1.0.0

for when it all comes tumbling down...

  Sources   Download

MIT

The Development Requires