How does laravel know the value of request()->getHttpHost()

  hostname, http, laravel, php, tinker

If I SSH into a server running a laravel app and run in the tinker command line:

print_r(request()->getHttpHost());

This tells me the domain name of the server. But how does it know? Where is this information stored. What does it query to get this information. And why doesn’t it return "localhost" or something similar.

Source: Laravel

Leave a Reply