Check for the presence of validation errors in the session, and add it to the view

This commit is contained in:
Samuel Georges 2015-01-05 14:57:17 +11:00
parent dc6098c089
commit 55a68be13b
1 changed files with 7 additions and 0 deletions

View File

@ -235,6 +235,13 @@ class Controller extends BaseController
'environment' => App::environment(),
];
/*
* Check for the presence of validation errors in the session.
*/
$this->vars['errors'] = (Config::get('session.driver') && \Session::has('errors'))
? \Session::get('errors')
: new \Illuminate\Support\ViewErrorBag;
/*
* Handle AJAX requests and execute the life cycle functions
*/