• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

printing all running session variable in laravel 5.1

phplaravelframeworkslaravel-5.1


PHP Snippet 1:

dd(session()->all());

PHP Snippet 2:

$data = session()->all();

PHP Snippet 3:

$sessions=session()->all();

PHP Snippet 4:

$sessions=Session::all();

PHP Snippet 5:

foreach($sessions as $k=>$v){
    echo $k."=".$v." ";
}
//or use : 
dd(session()->all()) ; // this is  var_dump equeivelent

PHP Snippet 6:

$user_id = session('user_id'); // key : user_id

Related Snippets

Remove categories with all childs derived from parent category

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

nginx err_connection_refused, can anyone help me?

stay with the last 15 elements of an array [duplicate]

dockerizing Laravel + vue

How to Install Composer Require doctrine/dbal

Laravel Mix Uncaught ReferenceError: $ is not defined

What is the function of the (new Date()).getTime() in PHP?

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

Limit WooCommerce products in cart only from one custom taxonomy

Detect a fetch request in PHP

php echo xml documents with header

Laravel update hasMany relationship using saveMany

Laravel Database Strict Mode

How to add a heading in between checkout fields of WooCommerce

About Contact Privacy policy Terms and conditions