hyperf路由写不规范,导致验证器的场景无效
时间:2024-8-5 16:03 作者:xiang 分类: 无
Router::get('/index/index', '\App\Controller\IndexController@index');
protected array $scenes = [
'index' => ['username'],
'bar' => ['username', 'password'],
];
导致scenes不成功
解决办法
Router::get('/index/index', 'App\Controller\IndexController@index');
App前不能加"\"