public function fields(Request $request)
{
return [
NestedTreeAttachManyField::make('Offer Categories',"categories","App\Nova\Category"),
];
}
It looks like the second parameter should be the method on the categories class that defines the self-referential relationship. It requires a belongsToMany to be returned.
However, I don't see the specifics for defining that method in the https://github.com/lazychaser/laravel-nestedset documentation, or from your documentation.
Is this a method provided by the nestedset trait? If so, what is the name?
If not, could you provide an example of the relationship method that needs to be defined. i.e. \App\Models\Category->categories()
Thanks,
Gary
It looks like the second parameter should be the method on the categories class that defines the self-referential relationship. It requires a belongsToMany to be returned.
However, I don't see the specifics for defining that method in the https://github.com/lazychaser/laravel-nestedset documentation, or from your documentation.
Is this a method provided by the nestedset trait? If so, what is the name?
If not, could you provide an example of the relationship method that needs to be defined. i.e. \App\Models\Category->categories()
Thanks,
Gary