Level 1
Found the solution. Add @mixin <model> to Resource class phpdoc
3 likes
Laravel 5.5 has a new API Resources feature, and it nicely redirects calls to model attributes (like $this->id). I use ide-helper:models to generate phpdocs for models that type-hints all model attributes. However, this does not apply to a resource and I get "Field accessed via magic method" squigglies. Is there a way to point it to model's phpdoc without copying it?
Found the solution. Add @mixin <model> to Resource class phpdoc
Please or to participate in this conversation.