webman-framework icon indicating copy to clipboard operation
webman-framework copied to clipboard

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

Open taozywu opened this issue 3 years ago • 1 comments

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 avatar Sep 07 '22 05:09 taozywu

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']);

taozywu avatar Sep 07 '22 06:09 taozywu