diff --git a/src/Generators/ControllerGenerator.php b/src/Generators/ControllerGenerator.php index ea5820a0..dc8987c9 100644 --- a/src/Generators/ControllerGenerator.php +++ b/src/Generators/ControllerGenerator.php @@ -207,7 +207,7 @@ private function fullyQualifyModelReference(string $sub_namespace, string $model /** @var \Blueprint\Models\Model $model */ $model = $this->modelForContext($model_name); - if (isset($this->models[Str::studly($model_name)])) { + if (isset($model)) { return $model->fullyQualifiedClassName(); }