mirror of https://github.com/1099438829/apeblog
修正后台管理获取model的问题
This commit is contained in:
parent
ddc284400b
commit
c051d27209
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue