更新时间:2022-01-23 06:38:22
根据文档:
接下来,只需将方法添加到您的控制器中,并以HTTP动词作为前缀 他们回应
Next, just add methods to your controller, prefixed with the HTTP verb they respond to
所以:
class UserController extends BaseController {
public function getIndex()
{
// Would response to /user and /user/index
}
}
因此,在您的情况下,只需将showWelcome()
重命名为getWelcome()
就足够了.
So, in your case simply renaming showWelcome()
to getWelcome()
should suffice.