[英]How to change the default landing page after serve command
I am wondering if it is possible to change the default startup address after the command我想知道是否可以在命令后更改默认启动地址
php artisan serve
Because when I run it, I get the default url因为当我运行它时,我得到了默认的 url
Starting Laravel development server: http://127.0.0.1:8000
But my "first page" is when I type但我的“第一页”是我打字的时候
http://127.0.0.1:8000/index
in the browser.在浏览器中。
So is it possible to automatically give out http://127.0.0.1:8000/index
after startup?那么启动后是否可以自动给出
http://127.0.0.1:8000/index
呢?
If you want to show your index.blade.php
at first place then just replace in your routes/web.php
如果您想首先显示您的
index.blade.php
,那么只需替换您的routes/web.php
From this由此
Route::get('/', function () {
return view('welcome');
});
TO this对此
Route::get('/', function () {
return view('index');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.