From 55a68be13b9e5b9d8e13739954c1901f19b6600b Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Mon, 5 Jan 2015 14:57:17 +1100 Subject: [PATCH] Check for the presence of validation errors in the session, and add it to the view --- modules/cms/classes/Controller.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index d29d813dc..0a72a6590 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -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 */