diff --git a/src/Commands/Concerns/CanGenerateFormsHelper.php b/src/Commands/Concerns/CanGenerateFormsHelper.php index b066aad..b7c9513 100644 --- a/src/Commands/Concerns/CanGenerateFormsHelper.php +++ b/src/Commands/Concerns/CanGenerateFormsHelper.php @@ -141,7 +141,7 @@ protected function getResourceFormSchema(string $model, bool $isFunCall = false) } else { foreach ($components as $componentName => $componentData) { // Constructor - $Prototype = (string) str($componentData['type']); + $Prototype = '\\'.(string) str($componentData['type']); $functionName = Str::camel("{$componentName}Field"); $output .= PHP_EOL; $output .= '/**'.PHP_EOL; diff --git a/src/Commands/Concerns/CanGenerateTablesHelper.php b/src/Commands/Concerns/CanGenerateTablesHelper.php index 7845f0d..da32eda 100644 --- a/src/Commands/Concerns/CanGenerateTablesHelper.php +++ b/src/Commands/Concerns/CanGenerateTablesHelper.php @@ -140,7 +140,7 @@ protected function getResourceTableColumns(string $model, bool $isFunCall = fals foreach ($columns as $columnName => $columnData) { // Constructor - $Prototype = (string) str($columnData['type']); + $Prototype = '\\'.(string) str($columnData['type']); $functionName = Str::camel("{$columnName}Column"); $output .= PHP_EOL; $output .= '/**'.PHP_EOL; diff --git a/src/Commands/Concerns/CanManipulateFiles.php b/src/Commands/Concerns/CanManipulateFiles.php index 1224087..dc3c541 100644 --- a/src/Commands/Concerns/CanManipulateFiles.php +++ b/src/Commands/Concerns/CanManipulateFiles.php @@ -77,6 +77,6 @@ protected function getDefaultStubPath(): string return (string) str($reflectionClass->getFileName()) ->beforeLast('Commands') - ->append('../stubs'); + ->append('Commands/stubs'); } }