如何在服务命令后更改默认登录页面

How to change the default landing page after serve command

我想知道是否可以在命令后更改默认启动地址

php artisan serve

因为当我运行它时,我得到默认的url

Starting Laravel development server: http://127.0.0.1:8000

但是我的“第一页”是我输入的时候

 http://127.0.0.1:8000/index 

在浏览器中。

那么启动后是否可以自动发出http://127.0.0.1:8000/index

如果你想在第一位显示你的 index.blade.php 那么只需替换你的 routes/web.php

由此

Route::get('/', function () {
   return view('welcome');
});

至此

Route::get('/', function () {
    return view('index');
});