fixed 控制器模型as首字母小写bug

This commit is contained in:
JaguarJack 2021-05-08 07:34:06 +08:00
parent f44f646878
commit 0a4951091f

View File

@ -66,7 +66,7 @@ class Controller extends Factory
[$model, $modelNamespace] = $this->parseFilename($params['model']); [$model, $modelNamespace] = $this->parseFilename($params['model']);
$asModel = lcfirst(Str::contains($model, 'Model') ? : $model . 'Model'); $asModel = ucfirst(Str::contains($model, 'Model') ? : $model . 'Model');
if (!$className) { if (!$className) {
throw new FailedException('未填写控制器名称'); throw new FailedException('未填写控制器名称');