{"id":28406712,"url":"https://github.com/eminiarts/nova-relationship-selector","last_synced_at":"2025-06-29T09:32:38.908Z","repository":{"id":33881807,"uuid":"163279149","full_name":"eminiarts/nova-relationship-selector","owner":"eminiarts","description":"Laravel Nova - Relationship Selector","archived":false,"fork":false,"pushed_at":"2022-12-12T06:31:20.000Z","size":1759,"stargazers_count":27,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T07:36:51.864Z","etag":null,"topics":["laravel","nova"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eminiarts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-27T10:08:17.000Z","updated_at":"2024-11-14T21:58:58.000Z","dependencies_parsed_at":"2023-01-15T03:08:17.530Z","dependency_job_id":null,"html_url":"https://github.com/eminiarts/nova-relationship-selector","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eminiarts/nova-relationship-selector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eminiarts%2Fnova-relationship-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eminiarts%2Fnova-relationship-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eminiarts%2Fnova-relationship-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eminiarts%2Fnova-relationship-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eminiarts","download_url":"https://codeload.github.com/eminiarts/nova-relationship-selector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eminiarts%2Fnova-relationship-selector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262569802,"owners_count":23330285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","nova"],"created_at":"2025-06-01T22:36:39.692Z","updated_at":"2025-06-29T09:32:38.897Z","avatar_url":"https://github.com/eminiarts.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Nova Relationship Selector\r\n\r\n[![Latest Version on Github](https://img.shields.io/github/release/eminiarts/nova-relationship-selector.svg?style=flat-square)](https://packagist.org/packages/eminiarts/nova-relationship-selector)\r\n[![Total Downloads](https://img.shields.io/packagist/dt/eminiarts/nova-relationship-selector.svg?style=flat-square)](https://packagist.org/packages/eminiarts/nova-relationship-selector)\r\n\r\nDisplay your resource's relationships with a dropdown vs endless scrolling\r\n\r\n![image](https://user-images.githubusercontent.com/3426944/50488260-e8e3d080-0a01-11e9-8c9e-8df945a9f6ce.png)\r\n\r\n### Installation\r\n\r\nYou can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:\r\n\r\n```bash\r\ncomposer require eminiarts/nova-relationship-selector\r\n```\r\n\r\n### Usage\r\n\r\n```php\r\nuse Eminiarts\\RelationshipSelector\\RelationshipSelector;\r\n```\r\n```php\r\npublic function fields()\r\n{\r\n    return [\r\n        \r\n        // ...\r\n        \r\n        RelationshipSelector::make('Relations')\r\n            -\u003eaddOption('Invoices', HasMany::make('Invoices'))\r\n            -\u003eaddOption('Notes', HasMany::make('Notes'))\r\n            -\u003eaddOption('Contacts', HasMany::make('Contacts'))\r\n            -\u003eaddOption('Tags', MorphToMany::make('Tags')),\r\n        \r\n        // ...\r\n        \r\n    ];\r\n}\r\n```\r\n\r\n### With Select\r\n\r\nIf you want to display the Select on the right side, you can use the `-\u003ewithSelect()` function.\r\n\r\n![image](https://user-images.githubusercontent.com/3426944/50475956-96d18980-09c6-11e9-9f02-56bdaca4ada6.png)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feminiarts%2Fnova-relationship-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feminiarts%2Fnova-relationship-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feminiarts%2Fnova-relationship-selector/lists"}