Skip to content

Conversation

@taozywu
Copy link

@taozywu taozywu commented Sep 7, 2022

1.Fix:when visit the homepage found 404;
2.Add:customize the default home page config

The following are some configurations.

app.php
// the default app name, if single application please input "" or "app"
"default_app" => "index",
// the default controller name
"default_controller" => "index",
// the default action name
"default_action" => "index",

@taozywu
Copy link
Author

taozywu commented Sep 7, 2022

Of course you can do this

Route.php

//redirect
Route::any('/', function ($request) {
     return redirect("/index");
});

or

//使用类
Route::any('/', [app\index\controller\Index::class, 'index']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant