Friday 6 September 2013

How can I find out what controller method was called in a Laravel4 NotFoundHttpException?

How can I find out what controller method was called in a Laravel4
NotFoundHttpException?

I am new to Laravel4 and I find it very annoying. One of my frustrations
is that when I get a NotFoundHTTPException it does not tell me which
Action was trying to be called! Because of this, I don't know if I have a
problem with my routes.php file, whether for form's
Form::open(array('url'=>'postUpload') location is bad or anything. With my
previous experience with Zend the error would tell you exactly which
action was trying to be called so I could troubleshoot exactly where the
problem is. I feel with Laravel, I have to make changes to so many files
(routes.php, blade.php, config.php, or Controller files) just to get to
the bottom of which file is the culprit.
So my question is: Is there a way I can extend, or show the action that
the application attempted to call on the NotFoundHttpException screen? I'm
not posting any code here because it won't help the situation. I need to
be able to tell which action the application is trying to call.
Thanks!!

No comments:

Post a Comment