修正后台管理获取model的问题

This commit is contained in:
liyukun 2021-10-17 23:41:12 +08:00
parent ddc284400b
commit c051d27209
1 changed files with 2 additions and 1 deletions

View File

@ -161,7 +161,8 @@ abstract class AuthController extends SystemBasic
protected function buildModel(string $module, string $controller)
{
$path = explode(".", $this->request->controller());
$modelPath = "app\\{$this->module}\\model";
// $modelPath = "app\\{$this->module}\\model";
$modelPath = "app\\common\\model"; //全部为common
foreach ($path as $v) $modelPath .= "\\".$v;
if (class_exists($modelPath)) return app($modelPath);
return null;