{"id":23219201,"url":"https://github.com/solutionforest/filament-tab-plugin","last_synced_at":"2025-07-07T08:34:33.531Z","repository":{"id":143625482,"uuid":"616371192","full_name":"solutionforest/filament-tab-plugin","owner":"solutionforest","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-01T02:10:50.000Z","size":58,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T21:34:49.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/solutionforest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-03-20T09:01:37.000Z","updated_at":"2024-06-15T16:11:56.000Z","dependencies_parsed_at":"2023-11-22T05:24:00.447Z","dependency_job_id":"8cdbb9ed-6ecd-47db-a096-12e5bfbd4b53","html_url":"https://github.com/solutionforest/filament-tab-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/solutionforest/filament-tab-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-tab-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-tab-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-tab-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-tab-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutionforest","download_url":"https://codeload.github.com/solutionforest/filament-tab-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-tab-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264043341,"owners_count":23548545,"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":[],"created_at":"2024-12-18T21:20:09.278Z","updated_at":"2025-07-07T08:34:33.503Z","avatar_url":"https://github.com/solutionforest.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]\n\u003e We will archive this project since filament3 supports tabs now.\n\u003e https://beta.filamentphp.com/docs/3.x/infolists/layout/tabs\n\n\n# Tab Layout Plugin\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/solution-forest/tab-layout-plugin.svg?style=flat-square)](https://packagist.org/packages/solution-forest/tab-layout-plugin)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/solution-forest/tab-layout-plugin/run-tests?label=tests)](https://github.com/solution-forest/tab-layout-plugin/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/solution-forest/tab-layout-plugin/Check%20\u0026%20fix%20styling?label=code%20style)](https://github.com/solution-forest/tab-layout-plugin/actions?query=workflow%3A\"Check+%26+fix+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/solution-forest/tab-layout-plugin.svg?style=flat-square)](https://packagist.org/packages/solution-forest/tab-layout-plugin)\n\nThis plugin creates widgets with tab layout for Filament Admin.\n\n![filament-tab-1](https://github.com/solutionforest/filament-tab-plugin/assets/68525320/0dd61497-1c22-474c-b74a-75700df51292)\n\nDemo site : https://filament-cms-website-demo.solutionforest.net/admin\n\nDemo username : demo@solutionforest.net\n\nDemo password : 12345678 Auto Reset every hour.\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require solution-forest/tab-layout-plugin\n```\n\nOptionally, you can publish the views using\n\n```bash\nphp artisan vendor:publish --tag=\"tab-layout-plugin-views\"\n```\n\n## Usage\n\nTo build `Tab` widget: \n```php\nphp artisan make:filament-tab-widget DummyTabs\n```\n\nYou will then define the child component 'schema()' to display inside:\n```php\nuse SolutionForest\\TabLayoutPlugin\\Components\\Tabs\\Tab as TabLayoutTab;\nuse SolutionForest\\TabLayoutPlugin\\Components\\Tabs\\TabContainer;\nuse SolutionForest\\TabLayoutPlugin\\Widgets\\TabsWidget as BaseWidget;\n\nclass DummyTabs extends BaseWidget\n{\n    protected function schema(): array\n    {\n        return [\n            TabLayoutTab::make('Label 1')\n                -\u003eicon('heroicon-o-bell') \n                -\u003ebadge('39')\n                -\u003eschema([\n                    TabContainer::make(\\Filament\\Widgets\\AccountWidget::class)\n                ]),\n            TabLayoutTab::make('Label 2')\n                -\u003eschema([\n                    TabContainer::make(\\Filament\\Widgets\\AccountWidget::class)\n                        -\u003ecolumnSpan(1),\n                    TabContainer::make(\\Filament\\Widgets\\AccountWidget::class)\n                        -\u003ecolumnSpan(1),\n                ])\n                -\u003ecolumns(2),\n            TabLayoutTab::make('Go To Filamentphp (Link)')-\u003eurl(\"https://filamentphp.com/\", true),\n        ];\n    }\n}\n```\n\nTabs may have an icon and badge, which you can set using the `icon()` and `badge()` methods:\n```php\nTab::make('Label 1')\n    -\u003eicon('heroicon-o-bell') \n    -\u003ebadge('39')\n    -\u003eschema([\n        // ...\n    ]),\n```\n\n## Assign parameters to component\nAdditionally, you have the option to pass an array of data to your component.\n```php\nprotected function schema(): array\n{\n    return [\n        TabLayoutTab::make('Label 1')\n            -\u003eicon('heroicon-o-bell')\n            -\u003ebadge('39')\n            -\u003eschema([\n                TabContainer::make(\\Filament\\Widgets\\AccountWidget::class)\n                TabContainer::make(ViewProductCategory::class)  //TARGET COMPONENT\n                    -\u003edata(['record' =\u003e 1]),    // TARGET COMPONENT'S DATA\n            ]),\n        TabLayoutTab::make('Label 2')\n            -\u003eschema([\n                TabContainer::make(\\Filament\\Widgets\\FilamentInfoWidget::class),\n            ]),\n    ];\n}\n```\n![tab-example-1](https://github.com/solutionforest/filament-tab-plugin/assets/68525320/1061acbb-cfdf-422f-8c2f-1c0f709ecf7f)\n![tab-example-2](https://github.com/solutionforest/filament-tab-plugin/assets/68525320/23898112-9d25-4260-bed1-081e679b8b68)\n\n\nIn addition to using the `TabContainer` component, you can create your own custom tab layout components by extending the `TabLayoutComponent` class or using command `php artisan tab-layout:component`.\n\nFor example, the following PHP code defines a FilamentInfoWidget class that extends TabLayoutComponent and specifies a `ComponentTabComponent` as the tab component to use. The **getData** method can be used to populate the component with data.\n```php\n\u003c?php\n\nnamespace App\\Filament\\Tabs\\Components;\n\nuse Filament\\Widgets\\FilamentInfoWidget as ComponentTabComponent;\nuse SolutionForest\\TabLayoutPlugin\\Components\\Tabs\\TabLayoutComponent;\n\nclass FilamentInfoWidget extends TabLayoutComponent\n{\n    protected ?string $component = ComponentTabComponent::class;\n\n    public function getData(): array\n    {\n        return [\n            // Data to assign to component\n        ];\n    }\n}\n```\nYou can also use the `php artisan tab-layout:component` command to generate the code for a new tab layout component. For example, to generate a `FilamentInfoWidget` component, you can run the following command:\n```bash\nphp artisan tab-layout:component FilamentInfoWidget Filament\\Widgets\\FilamentInfoWidget\n```\n\nAfter creating your custom tab layout component by extending the `TabLayoutComponent` class, you can register it on the schema of a `TabLayoutTab` instance.\n```php\nprotected function schema(): array\n{\n    return [\n        ...\n        TabLayoutTab::make('Label 3')\n            -\u003eschema([\n                App\\Filament\\Tabs\\Components\\FilamentInfoWidget::make()\n                    // -\u003edata([]),  // Also can assign data here\n            ]),\n    ];\n}\n```\n\n\n## Changelog\n\nPlease see [CHANGELOG](../../releases) for more information on what has changed recently.\n\n\n## Security Vulnerabilities\n\nIf you discover any security related issues, please email info+package@solutionforest.net instead of using the issue tracker.\n\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionforest%2Ffilament-tab-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutionforest%2Ffilament-tab-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionforest%2Ffilament-tab-plugin/lists"}