eminiarts / nova-relationship-selector
A Laravel Nova Package to group Relationships into a Selector.
Installs: 38 506
Dependents: 2
Suggesters: 0
Security: 0
Stars: 27
Watchers: 3
Forks: 0
Open Issues: 16
Requires
- php: >=7.1.0
- dev-master
- 1.0.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/minimist-1.2.6
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.8
This package is auto-updated.
Last update: 2024-12-12 10:51:36 UTC
README
Display your resource's relationships with a dropdown vs endless scrolling
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require eminiarts/nova-relationship-selector
Usage
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')), // ... ]; }
With Select
If you want to display the Select on the right side, you can use the ->withSelect()
function.