laravel/framework — pull request #5247 by anlutro (2014-07-28 08:19:33+00:00)
Title: Implement validation exceptions and passOrFail

Sometimes you want validation errors to bubble up, for example from a repository/model/entity through one or several service layer classes all the way up to the controller. Implementing a `getErrors()` method on 3 layers of classes gets extremely annoying. Validation exceptions make this easier. Example usage in a controller:

```php
public function someAction()
{
try {
$this->someService->doSomething(Input::all());
return Redirect::route('someroute')->with('success', 'Success!');
} catch (ValidationException $e) {
return Redirect::route('thisroute')->withErrors($e);
}
}
```