Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
formatting
  • Loading branch information
taylorotwell committed Mar 5, 2019
1 parent 5483549 commit 76c7126
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/Illuminate/Session/Middleware/StartSession.php
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->saveSession();
$this->saveSession($request);

return $response;
}
Expand Down Expand Up @@ -159,6 +159,17 @@ protected function addCookieToResponse(Response $response, Session $session)
}
}

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

/**
* Get the session lifetime in seconds.
*
Expand Down Expand Up @@ -205,14 +216,4 @@ 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();
}
}

0 comments on commit 76c7126

Please sign in to comment.