Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Generate full typed docblocks on relation methods when using the plugin to generate models #1124

Open
SebastianAwatramani opened this issue Dec 25, 2024 · 0 comments

Comments

@SebastianAwatramani
Copy link

Feature Description

E.g. if I create a new ModelB with a relation to ModelA, it will generate:

public function ModelA(): BelongsTo 
{
    return $this->belongsTo(ModelA::class);
}

I would like to see

 /**
 * @return BelongsTo<ModelA, ModelB>
 */
public function ModelA(): BelongsTo 
{
    return $this->belongsTo(ModelA::class);
}

Currently I have to generate the docs separately, and then go in and add the type hinting manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant