B
B
Bauyrzhan (Baur) Sovetkali2018-06-13 23:45:24
Laravel
Bauyrzhan (Baur) Sovetkali, 2018-06-13 23:45:24

Why are headers not being set in laravel 5.5 response?

Hello.
In the controller described the function:

public function about()
    {
        return response('string')->header('HeaderOne','One');
    }

The response has no header.
Tried it like this:
public function about()
    {
        return (new Response('string'))->header('Header-one','one');
    }

Please tell me why the headers are not set in the response.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bauyrzhan (Baur) Sovetkali, 2018-06-14
@Sovetkali

Understood.
If you use OpenServer, then the headers are not displayed. I don't know how to solve yet.
On a hosting, I use Jino, headings are deduced.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question