Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Illuminate/Session/Middleware/StartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function handle($request, Closure $next)
// Again, if the session has been configured we will need to close out the session
// so that the attributes may be persisted to some storage medium. We will also
// add the session identifier cookie to the application response headers now.
$this->manager->driver()->save();
$this->saveSession();

return $response;
}
Expand Down Expand Up @@ -205,4 +205,14 @@ protected function sessionIsPersistent(array $config = null)

return ! in_array($config['driver'], [null, 'array']);
}

/**
* Save the session data to storage.
*
* @return void
*/
protected function saveSession()
{
$this->manager->driver()->save();
}
}