Closed dennis-koster closed 2 years ago
Looks like an issue with laravel-ide-helper
: https://github.com/barryvdh/laravel-ide-helper/issues/1312. The Enum
class implements the interface Illuminate\Contracts\Database\Eloquent\Castable
and thus should be recognized correctly. I don't think there is anything we can do to improve this, so I am closing the issue.
Some general advice: In my experience the generated PHPDocs are imperfect in too many ways, I typically generate them once and then manually curate them as I make changes to the model.
Hi,
In the documentation it is stated that model annotations can be generated with the laravel-ide-helper package. However, this does not seem to work (anymore) in my case. Given the following example:
After running
php artisan ide-helper:model --reset --write
the following annotation is generated:Expected behaviour
I would expect the annotation to be:
Actual behaviour
The
mixed
type is used for the property type:Version
laravel/framework
:v8.78.1
bensampo/laravel-enum
:v3.4.2
barryvdh/laravel-ide-helper
:v2.12.3