路由规则的模型绑定支持简化名称

This commit is contained in:
thinkphp
2016-09-09 23:07:25 +08:00
parent e63a162bc7
commit e7f8db994a

View File

@@ -15,6 +15,7 @@ use think\App;
use think\Config;
use think\exception\HttpException;
use think\Hook;
use think\Loader;
use think\Log;
use think\Request;
use think\Response;
@@ -1347,6 +1348,7 @@ class Route
$model = $val;
$exception = true;
}
$model = strpos($model, '\\') ? $model : Loader::model($model);
$where = [];
$match = true;
foreach ($fields as $field) {