diff --git a/src/Actions/BuildModelDetails.php b/src/Actions/BuildModelDetails.php index 55676b2..ac1ecec 100644 --- a/src/Actions/BuildModelDetails.php +++ b/src/Actions/BuildModelDetails.php @@ -15,8 +15,9 @@ class BuildModelDetails /** * Build the model details. * - * @param SplFileInfo $modelFile + * @param SplFileInfo $modelFile * @return array + * * @throws ReflectionException */ public function __invoke(SplFileInfo $modelFile): array diff --git a/src/Actions/WriteColumnAttribute.php b/src/Actions/WriteColumnAttribute.php index 300c360..1c14df4 100644 --- a/src/Actions/WriteColumnAttribute.php +++ b/src/Actions/WriteColumnAttribute.php @@ -85,6 +85,10 @@ public function __invoke(ReflectionClass $reflectionModel, array $attribute, str $type .= '|null'; } + if (isset($attribute['hidden']) && $attribute['hidden']) { + $name = "{$name}?"; + } + if ($jsonOutput) { return [[ 'name' => $name,