Just started learning tp6
When executing tp6.io/index/Index/hello(), the execution result is tp6.io/index/Index/index, the same is true for other controllers, such as
tp6.io/index/Index/user is also
Code:
<?phpnamespace app\controller;use app\BaseController;use think\facade\Db;use think \facade\Env;class Index extends BaseController{ public function index(){ return 'administrator'; } public function user(){ return 'users'; } public function hello($name = 'ThinkPHP6') { return 'hello, ' . $name; }}