A Laravel Nova Package to group Relationships into a Selector.
eminiarts/nova-relationship-selector is a Laravel package for a laravel nova package to group relationships into a selector..
It currently has 27 GitHub stars and 69.565 downloads on Packagist (latest version 1.0.0).
Install it with composer require eminiarts/nova-relationship-selector.
Discover more Laravel packages by eminiarts
or browse all Laravel packages to compare alternatives.
Last updated
Display your resource's relationships with a dropdown vs endless scrolling

You can install the package in to a Laravel app that uses Nova via composer:
composer require eminiarts/nova-relationship-selector
use Eminiarts\RelationshipSelector\RelationshipSelector;
public function fields()
{
return [
// ...
RelationshipSelector::make('Relations')
->addOption('Invoices', HasMany::make('Invoices'))
->addOption('Notes', HasMany::make('Notes'))
->addOption('Contacts', HasMany::make('Contacts'))
->addOption('Tags', MorphToMany::make('Tags')),
// ...
];
}
If you want to display the Select on the right side, you can use the ->withSelect() function.
