📜  获取 http 主机 laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:49.555000             🧑  作者: Mango

代码示例2
//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"