Hmm. I see the sense in what you're saying. I've tried both of your suggestions above but it's still not working.
Session flash just don't seem to be working properly in my setup. However I have checked the storage/framework/sessions folder and it is writeable and files are appearing in there.
My code to set the flash message is
public function sendContactInfo(ContactUsRequest $request)
{
...
$request->session()->flash('flash_warning', "Are you sure you are Human?");
return Redirect::back()->withInput();
}
(ContactUsRequest is a request validator thing which actually works ok)
And in AppServiceProvider boot method
if (Session::has('flash_warning'))
{
View::share('flash_warning', Session::get('flash_warning'));
die("FW");
}
And it's not there. I've tried dumping the session (in the actual handler method for this post) with
echo "<pre>" , print_r( $request->session()->all() ), "</pre>";
And it exists and contains a _flash array which contains empty "old" and "new" arrays and that's it.
(For clarity the session contains a token and other bits and bobs but the _flash array is where I assume this should be and that is otherwise empty)
Any thoughts really appreciated!!