Closed chescos closed 5 years ago
Nice idea! Would need to a table beneath the details as a separate field component
Related::make()->types([
HasMany::make('Comments'),
BelongsToMany::make('Accounts'),
MorphMany::make('Activities'),
])
on dropdown change event change a dynamic component
<component :is="selectedComponent" :resourceName="selectedResource"></component>
@dillingham yes, that's exactly what I mean!
Hello
https://github.com/eminiarts/nova-relationship-selector
As discussed with @dillingham in our tabs-package, I extracted it to its own package.
Still needs a bit of styling, but the functionality is there.
Regards Bajram
@bajramemini thank you so much for putting that together, just tried it out and it works great! My User
model has 27 relationships and finally, I can add them to my User
Nova resource.
@dillingham thank you too for communicating with him to make this happen :)
@bajramemini thanks again for contributing such a useful package!
@chescos no problem :)
Instead of automatically loading all relationship tables on the details view, relationship names are added to a select menu that enables easy and fast navigation with loading on demand.
Relationships are not automatically loaded when the details view is loaded. Instead, a relationship is only loaded when it is selected through the select menu. Only the currently selected relationship table is displayed.
This package would have two main goals:
Example: