What is meant by Attaching Headers ?
Answer / 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 |
How to share sites with external world on valet?
What are cookies? How to get, set, distroy cookies in laravel?
What is meant by Attaching Cookies ?
What is laravel boilerplate?
What is laravel?
What is laravel vue?
How to redirect form controller to view file in laravel?
How to generate application key in laravel?
What are redirect responses?
What do you maen by method spoofing in laravel 5?
Tell me what are system requirement for laravel 5.0?
What is meant by Modularity ?