Open fbarrento opened 1 year ago
This exception is supposed to throw when it cannot determine either accessors/mutator method, think like
public function getParentAttribute(): ?self
{
return $this->where('id', $this->parent_id)->first();
}
or
protected function parent(): Attribute
{
return Attribute::make(
get: fn() => $this->where('id', $this->parent_id)->first();
);
}
Which in your case looks like its coming from that NodeTrait
so I would have to see whats all in that trait.
When you run the Laravel Model Show command what is the output for this model?
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.
What happened?
When running
vendor/bin/sail artisan model:typer --plurals --api-resources
modeltyper return this error:I'm using NestedSet Package to manage the categories.
And applying the trait on the categories model.
Environment: laravel: 10 database: postgres
Expected Behavior
The expected behavior is the output of TypeScript interfaces declarations on the console.
Steps To Reproduce
vendor/bin/sail artisan model:typer --plurals --api-resources