Monday 15 June 2015

php - Exception catching in Laravel 4 -


There is a problem catching up in the exception of my Lover 4 application. I have a way to do that, get the root :: ('/ article / edit / {id}', 'article controller @ edit') -> Where ('id', '[0-9] +');

Now if I go to localhost: 8000 / articles / edit / 6 , then it works fine, but if I localhost: 8000 / Articles go to / edit / 6A this section fails because it contains letters other than numbers, and throws NotFoundHttpException .

I have tried to edit this exception from inside the function, well by the path file, but there is no luck since I'm just starting with Laravel 4 so I will get some help here because Google has not helped "post-text" itemprop = "text">

You can not use App :: missing by NotFoundHttpException Can define custom handler for. From:

  App: unavailable (function ($ exception) {return response :: view ('errors.mailing', array (), 404);});    

No comments:

Post a Comment