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...

What is meant by Attaching Headers ?

Answer Posted / surbhi

The response can be attached to headers using the header() method.

We can also attach the series of headers as shown in the below sample code.

return response($content,$status)
->header('Content-Type', $type)
->header('X-Header-One', 'Header Value')
->header('X-Header-Two', 'Header Value');

Example : Route::get('/header',function(){
return response("Hello", 200)->header('Content-Type', 'text/html');
});

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List out the plateforms laravel homestead supports?

675


Is laravel an mvc?

740


How to create Creating a Controller ?

1308


What is factory in laravel?

731


How to clear complete cache in laravel?

770


Explain how can you write your own service provider in laravel?

736


Does laravel support caching?

670


What are laravel eloquent?

669


How install react js in laravel?

742


How to configure network interfaces in homestead?

772


What is service container?

724


How to launch vagrant box?

705


What are the Writing Gates and Policies ?

1616


In laravel, what is guarded attribute in a model?

692


Which js framework is best with laravel?

709