Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get http host laravel

//Laravel Get Host

$host = request()->getHttpHost();
//output i.e "127.0.0.1:8000"

$host = request()->getHost();
//output i.e "127.0.0.1"

$host = request()->getSchemeAndHttpHost();
//output i.e "http://127.0.0.1:8000"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #http #host #laravel
ADD COMMENT
Topic
Name
4+8 =