当我们运行"php artisan serve"时,如何将默认网址从localhost:8000更改为laravel中的其他IP. [英] How to change default url from localhost:8000 to other Ip in laravel when we run "php artisan serve"

查看:55
本文介绍了当我们运行"php artisan serve"时,如何将默认网址从localhost:8000更改为laravel中的其他IP.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 php artisan serve 命令

默认情况下,结果为:

Laravel开发服务器已启动: http://127.0.0.1:8000

我想更改指向其他IP的地址

I want to change pointing to other ip

推荐答案

# php artisan serve --help
Usage:
  serve [options]

Options:
      --host[=HOST]     The host address to serve the application on. [default: "127.0.0.1"]
      --port[=PORT]     The port to serve the application on. [default: 8000]
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Serve the application on the PHP development server

这篇关于当我们运行"php artisan serve"时,如何将默认网址从localhost:8000更改为laravel中的其他IP.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆