Fatal error: Class 'Route' not found in E:\www\vendor\topthink\think-captcha\src\helper.php on line 12
Composer 的代码是:
composer require topthink/think-captcha
而出错那行代码应该是路由配置,如下:
Route::get('captcha/[:id]', "\\think\\captcha\\CaptchaController@index");
Validate::extend('captcha', function ($value, $id = '') {
return captcha_check($value, $id);
});
Validate::setTypeMsg('captcha', ':attribute错误!');其实3行代码都会报错,这个是怎么一回事呢?请TP5高手指教。php是5.6.x 和 TP5.0.11
最佳答案