I have a laravel form which submits data via a POST request to a controller like so...
public function store()
{
$result = Validator::make(request() -> all(), $this -> rules);
if ($result -> fails())
{
return back() -> withInput() -> withErrors($result);
}
}
However, when I'm redirected back, accessing input data via the 'old' helper method returns nothing, as does reading data from $errors.
I believe the session data is being lost (possibly due to a secondary redirect?).
I've checked my routes file in artisan and the web middleware is only being run once on the routes. I'm also using the database session driver.
Any ideas? I'm using Laravel 5.2.39