modeltyper
modeltyper copied to clipboard
[BUG] Relation with name `model` returns itself as type
What happened?
In my models/Payment.php:
public function model(): MorphTo|Model
{
return $this->morphTo();
}
I have tried adding an interface and another return type as well:
public static array $interfaces = [
'model' => ['type' => 'Listing|PetPurchase'],
];
public function model(): MorphTo|Listing|PetPurchase
{
return $this->morphTo();
}
Either way it returns:
export interface Payment {
model: Payment
}
Expected Behavior
No response
Steps To Reproduce
No response
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.