I have this problem when setting up resource routing:
[0] HttpException in helper.php line 526
resource not found.
* @param integer|Response $code 状态码 或者 Response对象实例
* @param string $message 错误信息
* @param array $header 参数
*/
function abort($code, $message = null, $header = [])
{
if ($code instanceof Response) {
throw new HttpResponseException($code);
} else {
throw new HttpException($code, $message, null, $header);
}
}
}
if (!function_exists('halt')) {
/**
* 调试变量并且中断输出
* @param mixed $var 调试变量或者信息
*/
routing configuration file
// Api路由设置文件
return [
'[api]' => [
// 默认请求
'wechat' => ['api/wechat/index', ['method' => 'get,post']],
// 微信公众号
'wechat/:appid' => ['api/wechat/index', ['method' => 'get,post'], ['appid'=>'[0-9a-z]{18}']],
// 微信小程序
'wemini/:appid' => ['api/wemini/index', ['method' => 'get,post'], ['appid'=>'[0-9a-z]{18}']],
],
// 公共资源
'__rest__' => [
'app/article' => 'api/article',
]
];
unsolved