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 get Retrieving a Cookie in Laravel ?

Answer Posted / rajani

Once we set the cookie, we can retrieve the cookie by cookie() method.
This cookie() method will take only one argument which will be the name of the cookie.
The cookie method can be called by using the instance of IlluminateHttpRequest.

Here is a sample code with explanation.

//’name’ is the name of the cookie to retrieve the value of
$value = $request->cookie('name');

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I make all of my forms bootstrap opinionated?

679


How facades are different from dependency injection?

662


What is composer in laravel php?

760


How to implement you own package in laravel?

705


Explain the middlewares in laravel?

664


Explain about laravel project?

659


What is use of model in laravel?

687


What is meant by url in internet?

650


What is a controller middleware?

717


What is a Views ?

851


What is a check method ?

1066


Please explain the difference between laravel and codeigniter?

666


Why use route?

626


How to list all routes in laravel?

725


What is the role of service provider?

611