Laravel get Session ID
Laravel get Session ID : Laravel session ID depends upon the version of the Laravel, Here in this tutorial we are going to explain how you can get Session ID in Laravel. We are going to explain how to get Session Id in Different versions of Laravel.
Laravel get Session ID Example
You can get the session Id in different versions of laravel as –
Laravel 3
You can get the Session ID in Laravel 3 simply as below –
Laravel get Session ID Example:
$sessionID = $_COOKIE['laravel_session']; |
Laravel 4.0
You can get the Session ID in Laravel 4.0 simply as below –
Laravel get Session ID Example:
$sessionID = session_id(); |
Laravel 4.1 & Onwards | Laravel 5
You can get the Session ID in Laravel 4.1 and onwards version simply as below –
Laravel get Session ID Example:
$sessionID = Session::getId(); |
Advertisements