-
Notifications
You must be signed in to change notification settings - Fork 37
Description
I'll start by saying that this is most likely not a laracasts/Validation error, but since the entire setup is exactly what @JeffreyWay suggested in the README it's probably the best place to ask for help.
So here's the issue:
I've got a FormValidator setup and the exception is caught in the error handler under global.php, which does
return Redirect::back()->withInput()->withErrors($e->getErrors); //etc
Everything works just fine when using this pattern in the production environment.
However, I'm storyBDD-ing it with Behat, which triggers the testing environment via the URL (i.e. my-project.testing vs my-project.dev)
The problem is, the errors do not appear in the view after the redirect, if I dd() in the error handling closure, I can see that the validator returns the expected errors, however they never get passed to the view.
Worth mentioning the fact that my session driver for the testing environment is set to native, and I've tried cookies as well, so I think it's rather an issue with Redirect + flashing session data happening in this particular situation.
I have a temporary work-around, with the try..catch working in the controller, but I'd like to go back to using global error handling rather then the ugly try catch version.