Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to Accessing Session Data in Laravel ?

Answer Posted / amit khanna

To access the session data, we need an instance of session which can be accessed via HTTP request.
After getting the instance, we can use the get() method, which will take one argument, key, to get the session data.

Syntax : $value = $request->session()->get('key');

You can use all() method to get all session data instead of get() method.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell us have you used lumen before?

733


What is mvc in laravel?

765


What is the service container in laravel?

739


Explain how to do 301 redirects in laravel?

686


What is make method?

746


How to set login page as default page in laravel?

735


What are macros in laravel?

730


Is laravel faster than rails?

737


What are helper functions in laravel?

777


Is laravel built on symfony?

666


Define lumen.

709


what is meant by Global Middleware and Route Middleware ?

1772


What are redirect responses?

702


What is eager loading in laravel?

698


How to use basic routing in laravel?

770