{"id":21504426,"url":"https://github.com/dcasia/resource-navigation-tab","last_synced_at":"2025-04-07T12:10:39.794Z","repository":{"id":36352255,"uuid":"223703944","full_name":"dcasia/resource-navigation-tab","owner":"dcasia","description":"Organize your resource fields into tabs.","archived":false,"fork":false,"pushed_at":"2023-11-14T05:48:35.000Z","size":792,"stargazers_count":79,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T11:03:54.299Z","etag":null,"topics":["card","field","laravel","nova","nova4","tabs"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcasia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"milewski","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2019-11-24T06:45:56.000Z","updated_at":"2024-11-26T13:05:08.000Z","dependencies_parsed_at":"2023-10-13T02:59:02.852Z","dependency_job_id":"ea8e4b36-394f-437e-8c1a-3dd1bb5f46a7","html_url":"https://github.com/dcasia/resource-navigation-tab","commit_stats":{"total_commits":38,"total_committers":7,"mean_commits":5.428571428571429,"dds":0.5263157894736843,"last_synced_commit":"74f41a8860340eba83dce5986b2d2867249d6ac4"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fresource-navigation-tab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fresource-navigation-tab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fresource-navigation-tab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcasia%2Fresource-navigation-tab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcasia","download_url":"https://codeload.github.com/dcasia/resource-navigation-tab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["card","field","laravel","nova","nova4","tabs"],"created_at":"2024-11-23T18:59:55.313Z","updated_at":"2025-04-07T12:10:39.776Z","avatar_url":"https://github.com/dcasia.png","language":"PHP","funding_links":["https://github.com/sponsors/milewski"],"categories":[],"sub_categories":[],"readme":"# Resource Navigation Tab\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/digital-creative/resource-navigation-tab)](https://packagist.org/packages/digital-creative/resource-navigation-tab)\n[![Total Downloads](https://img.shields.io/packagist/dt/digital-creative/resource-navigation-tab)](https://packagist.org/packages/digital-creative/resource-navigation-tab)\n[![License](https://img.shields.io/packagist/l/digital-creative/resource-navigation-tab)](https://github.com/dcasia/resource-navigation-tab/blob/main/LICENSE)\n\nOrganize your resource fields into tabs.\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/dcasia/resource-navigation-tab/main/screenshots/dark/demo-2.png\"\u003e\n  \u003cimg alt=\"Resource Navigation Tab in Action\" src=\"https://raw.githubusercontent.com/dcasia/resource-navigation-tab/main/screenshots/light/demo-2.png\"\u003e\n\u003c/picture\u003e\n\n# Installation\n\nYou can install the package via composer:\n\n```shell\ncomposer require digital-creative/resource-navigation-tab\n```\n\n## Basic Usage\n\nFirst, import `HasResourceNavigationTabTrait` trait into your resource and start grouping your fields with\nthe `ResourceNavigationField` object:\n\n```php\nuse DigitalCreative\\ResourceNavigationTab\\HasResourceNavigationTabTrait;\nuse DigitalCreative\\ResourceNavigationTab\\ResourceNavigationField;\n\nclass ExampleNovaResource extends Resource {\n \n    use HasResourceNavigationTabTrait;\n\n    public function fields(NovaRequest $request): array\n    {\n        return [\n            ResourceNavigationField::make('Information')\n                -\u003efields([\n                    Text::make('Name'),\n                    Text::make('Age'),\n                    HasMany::make('Hobbies'),\n                ]),\n            ResourceNavigationField::make('Activities')-\u003efields([ ... ]),\n            ResourceNavigationField::make('Social Interactions')-\u003efields([ ... ]),\n            ResourceNavigationField::make('Settings')-\u003efields([ ... ]),\n        ];\n    }\n\n}\n```\n\nOnce setup navigate to your resource detail view, and you should be presented with this card:\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/dcasia/resource-navigation-tab/main/screenshots/dark/demo-1.png\"\u003e\n  \u003cimg alt=\"Resource Navigation Tab in Action\" src=\"https://raw.githubusercontent.com/dcasia/resource-navigation-tab/main/screenshots/light/demo-1.png\"\u003e\n\u003c/picture\u003e\n\nEvery defined card will be shown on every tab by default, however you can choose which card you want to show when a\nspecific tab is selected:\n\n```php\nuse DigitalCreative\\ResourceNavigationTab\\HasResourceNavigationTabTrait;\nuse DigitalCreative\\ResourceNavigationTab\\ResourceNavigationField;\nuse DigitalCreative\\ResourceNavigationTab\\CardMode;\n\nclass ExampleNovaResource extends Resource {\n\n    use HasResourceNavigationTabTrait;\n \n    public function fields(NovaRequest $request): array\n    {\n        return [\n            ResourceNavigationField::make('Information'), // show all the available cards by default\n            ResourceNavigationField::make('Activities')-\u003ewithCards([ DailySalesCard::class, ClientProfileCard::class ]), // only show these cards when this tab is active\n            ResourceNavigationField::make('Settings')-\u003ewithoutCards(), // hide all cards when this tab is active\n        ];\n    }\n\n    public function cards(NovaRequest $request): array\n    {\n        return [\n            new ClientPerformanceCard(),\n            new DailySalesCard(),\n            new ClientProfileCard()\n        ];\n    }\n\n}\n```\n\n## ⭐️ Show Your Support\n\nPlease give a ⭐️ if this project helped you!\n\n### Other Packages You Might Like\n\n- [Nova Dashboard](https://github.com/dcasia/nova-dashboard) - The missing dashboard for Laravel Nova!\n- [Nova Welcome Card](https://github.com/dcasia/nova-welcome-card) - A configurable version of the `Help card` that comes with Nova.\n- [Icon Action Toolbar](https://github.com/dcasia/icon-action-toolbar) - Replaces the default boring action menu with an inline row of icon-based actions.\n- [Expandable Table Row](https://github.com/dcasia/expandable-table-row) - Provides an easy way to append extra data to each row of your resource tables.\n- [Collapsible Resource Manager](https://github.com/dcasia/collapsible-resource-manager) - Provides an easy way to order and group your resources on the sidebar.\n- [Resource Navigation Tab](https://github.com/dcasia/resource-navigation-tab) - Organize your resource fields into tabs.\n- [Resource Navigation Link](https://github.com/dcasia/resource-navigation-link) - Create links to internal or external resources.\n- [Nova Mega Filter](https://github.com/dcasia/nova-mega-filter) - Display all your filters in a card instead of a tiny dropdown!\n- [Nova Pill Filter](https://github.com/dcasia/nova-pill-filter) - A Laravel Nova filter that renders into clickable pills.\n- [Nova Slider Filter](https://github.com/dcasia/nova-slider-filter) - A Laravel Nova filter for picking range between a min/max value.\n- [Nova Range Input Filter](https://github.com/dcasia/nova-range-input-filter) - A Laravel Nova range input filter.\n- [Nova FilePond](https://github.com/dcasia/nova-filepond) - A Nova field for uploading File, Image and Video using Filepond.\n- [Custom Relationship Field](https://github.com/dcasia/custom-relationship-field) - Emulate HasMany relationship without having a real relationship set between resources.\n- [Column Toggler](https://github.com/dcasia/column-toggler) - A Laravel Nova package that allows you to hide/show columns in the index view.\n- [Batch Edit Toolbar](https://github.com/dcasia/batch-edit-toolbar) - Allows you to update a single column of a resource all at once directly from the index page.\n\n## License\n\nThe MIT License (MIT). Please see [License File](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcasia%2Fresource-navigation-tab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcasia%2Fresource-navigation-tab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcasia%2Fresource-navigation-tab/lists"}