lundi 4 janvier 2016

Laravel 5 Custom Fatal Error Exception

I am building a web service in Laravel 5. However if there's a fatal error, Laravel always return the generic 'Whoops, looks like something went wrong' page.

How can change it to return JSON / XML instead?

Note

  • I know that you can put other exception in app\Exceptions\Handler.php but this doesn't work for Fatal Error Exception
  • I read for Laravel 4 you can do App::fatal(function(){...}) Is this still the valid way to do in Laravel 5? If yes where should I put it?

Thanks heaps



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1OwkURF
via IFTTT

Aucun commentaire:

Enregistrer un commentaire