• 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

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

curl returning 301 error after migrating to https

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

How do I set the maximum php memory limit

How to prevent phpmailer sending embedded image as an attachment on Gmail?

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

Store multiple fields in JSON column (Nova CMS)

Backend cannot be reached after Typo3 login screen

Laravel 8 factory state afterCreating

Remove categories with all childs derived from parent category

Getting public posts of a random user from Facebook API

Add and update products to session cart in Laravel

Can't exclude directories from .htaccess mobile redirect?

JSON Render Issue in Date Object Laravel and PHP 7.4

Unit (real unit test) of test laravel relationship

About Contact Privacy policy Terms and conditions