mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
路由规则的模型绑定支持简化名称
This commit is contained in:
@@ -15,6 +15,7 @@ use think\App;
|
|||||||
use think\Config;
|
use think\Config;
|
||||||
use think\exception\HttpException;
|
use think\exception\HttpException;
|
||||||
use think\Hook;
|
use think\Hook;
|
||||||
|
use think\Loader;
|
||||||
use think\Log;
|
use think\Log;
|
||||||
use think\Request;
|
use think\Request;
|
||||||
use think\Response;
|
use think\Response;
|
||||||
@@ -1347,6 +1348,7 @@ class Route
|
|||||||
$model = $val;
|
$model = $val;
|
||||||
$exception = true;
|
$exception = true;
|
||||||
}
|
}
|
||||||
|
$model = strpos($model, '\\') ? $model : Loader::model($model);
|
||||||
$where = [];
|
$where = [];
|
||||||
$match = true;
|
$match = true;
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
|||||||
Reference in New Issue
Block a user