• 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

carbon generated datetime not stored correctly into the database

Laravel Carbon get start + end of last week?

Laravel 8: Array to string conversion while calling route:list

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Symfony Mercure "Failed to send an update"

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

find in set in laravel ? example

Symfony run hint kernel.secret parameter not found

Laravel Route issues with Route order in web.php

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

Laravel multi auth - Authentication user provider [] is not defined

How to get unique slug to same post-title for other time too?

Natural ORDER in Laravel Eloquent ORM

php 7 php.ini upload_max_filesize not working

Image upload not working through ajax Laravel

About Contact Privacy policy Terms and conditions