{"id":50000538,"url":"https://github.com/bezhanSalleh/filament-panel-switch","last_synced_at":"2026-06-05T01:00:41.204Z","repository":{"id":186216063,"uuid":"674460446","full_name":"bezhanSalleh/filament-panel-switch","owner":"bezhanSalleh","description":"The Panel Switch Plugin for Filament offers a robust and customizable component for switching between panels in applications built with FilamentPHP.","archived":false,"fork":false,"pushed_at":"2026-04-20T03:25:30.000Z","size":2674,"stargazers_count":162,"open_issues_count":1,"forks_count":30,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-05-31T23:07:03.607Z","etag":null,"topics":["filament","filament-plugin","filamentphp","panel-switch","panels"],"latest_commit_sha":null,"homepage":"","language":"Blade","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/bezhanSalleh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"bezhanSalleh"}},"created_at":"2023-08-04T02:26:51.000Z","updated_at":"2026-05-27T22:43:05.000Z","dependencies_parsed_at":"2023-11-22T19:29:39.879Z","dependency_job_id":"a507ec39-e957-4c74-95e5-a024011b3df6","html_url":"https://github.com/bezhanSalleh/filament-panel-switch","commit_stats":null,"previous_names":["bezhansalleh/filament-panel-switch"],"tags_count":18,"template":false,"template_full_name":"filamentphp/plugin-skeleton","purl":"pkg:github/bezhanSalleh/filament-panel-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezhanSalleh%2Ffilament-panel-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezhanSalleh%2Ffilament-panel-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezhanSalleh%2Ffilament-panel-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezhanSalleh%2Ffilament-panel-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bezhanSalleh","download_url":"https://codeload.github.com/bezhanSalleh/filament-panel-switch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezhanSalleh%2Ffilament-panel-switch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33926275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["filament","filament-plugin","filamentphp","panel-switch","panels"],"created_at":"2026-05-19T12:00:26.529Z","updated_at":"2026-06-05T01:00:41.172Z","avatar_url":"https://github.com/bezhanSalleh.png","language":"Blade","funding_links":["https://github.com/sponsors/bezhanSalleh"],"categories":["Plugins"],"sub_categories":["Administration \u0026 Management"],"readme":"\u003ca href=\"https://github.com/bezhansalleh/filament-panel-switch\" class=\"filament-hidden\"\u003e\n\n![Panel Switch](https://repository-images.githubusercontent.com/674460446/9c4530cf-420e-4745-a401-0be18d1dd09d \"Panel Switch\")\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://filamentphp.com/docs/4.x/introduction/overview\"\u003e\n        \u003cimg alt=\"FILAMENT 4.x\" src=\"https://img.shields.io/badge/FILAMENT-4.x-EBB304?style=for-the-badge\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://filamentphp.com/docs/5.x/introduction/overview\"\u003e\n        \u003cimg alt=\"FILAMENT 5.x\" src=\"https://img.shields.io/badge/FILAMENT-5.x-EBB304?style=for-the-badge\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/bezhansalleh/filament-panel-switch\"\u003e\n        \u003cimg alt=\"Packagist\" src=\"https://img.shields.io/packagist/v/bezhansalleh/filament-panel-switch.svg?style=for-the-badge\u0026logo=packagist\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/bezhansalleh/filament-panel-switch/actions?query=workflow%3A\"fix+php+code+styling\"+branch%3A3.x\" class=\"filament-hidden\"\u003e\n        \u003cimg alt=\"Code Style Passing\" src=\"https://img.shields.io/github/actions/workflow/status/bezhansalleh/filament-panel-switch/fix-php-code-styling.yml?style=for-the-badge\u0026logo=github\u0026label=code%20style\"\u003e\n    \u003c/a\u003e\n\n\u003ca href=\"https://packagist.org/packages/bezhansalleh/filament-panel-switch\"\u003e\n    \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/packagist/dt/bezhansalleh/filament-panel-switch.svg?style=for-the-badge\" \u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# Panel Switch\nThe Panel Switch Plugin for Filament offers a robust and customizable component for switching between panels in applications built with FilamentPHP.\n    \n![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/modern-icon-demo.gif?raw=true \"Modern Icon Demo\") \n![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/modern-image-demo.gif?raw=true \"Modern Image Demo\") \n![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/demo.gif?raw=true \"Simple Demo\") \n\n\u003ch2 class=\"filament-hidden\"\u003eTable Of Contents\u003c/h2\u003e\n\u003cul class=\"filament-hidden\"\u003e\n\u003cli\u003e\n\u003ca href=\"#panel-switch\"\u003ePanel Switch\u003c/a\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"#panel-access--navigation\"\u003ePanel Access \u0026 Navigation\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#design-or-style\"\u003eDesign or Style\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#labels\"\u003eLabels\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#icons\"\u003eIcons\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#sort-order\"\u003eSort Order\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#placement\"\u003ePlacement\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#full-example\"\u003eFull Example\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#changelog\"\u003eChangelog\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#security-vulnerabilities\"\u003eSecurity Vulnerabilities\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\n#### Compatibility\n\n| Package Version | Filament Version | \n|----------------|---------------------|\n| [1.x](https://github.com/bezhanSalleh/filament-panel-switch/tree/1.x) | [3.x](https://filamentphp.com/docs/3.x/panels/installation) |\n| [2.x](https://github.com/bezhanSalleh/filament-panel-switch/tree/2.x) | [4.x](https://filamentphp.com/docs/4.x/introduction/overview) \u0026 [5.x](https://filamentphp.com/docs/5.x/introduction/overview) |\n| 3.x - current | [4.x](https://filamentphp.com/docs/4.x/introduction/overview) \u0026 [5.x](https://filamentphp.com/docs/5.x/introduction/overview) |\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require bezhansalleh/filament-panel-switch\n```\n\n\u003e [!IMPORTANT]\n\u003e The plugin follows Filament's theming rules. So, to use the plugin create a custom theme if you haven't already, and add the following line to your `theme.css` file:\n\n```php\n@source '../../../../vendor/bezhansalleh/filament-panel-switch/resources/views/**/*.blade.php';\n```\nNow build your theme using: \n```bash\nnpm run build\n```\n--- \n\nUpon installation, the Plugin seamlessly integrates with Filament without any further setup.\nThough the plugin works out-of-the-box, it's designed for customization. Delve into the Configuration section below for detailed customization options.\n\n## Configuration\nStart your custom configuration using the `configureUsing` method in your service provider's boot method:\n\n```php\nuse BezhanSalleh\\PanelSwitch\\PanelSwitch;\n\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    // Custom configurations go here\n});\n```\n### Panel Access \u0026 Navigation\nThe panel switch is automatically visible when the authenticated user has access to two or more panels. Panel access is determined via the `canAccessPanel` method on your User model — no additional configuration needed. Panels the user cannot access are automatically hidden from the switch.\n\nTo further limit which panels appear in the switch, use the `panels()` method:\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    $panelSwitch-\u003epanels([\n        'admin',\n        'dev',\n        'app'\n    ]);\n});\n```\nThe `panels()` method also accepts a closure that returns an array of panel ids. This is useful when you want to dynamically determine the panels that will be listed. The plugin will also validate the panels to ensure that they are valid filament panels. If any of the panels provided are invalid, the plugin will throw an `InvalidArgumentException`.\n\n### Design or Style\nThe plugin supports two design styles:\n\n- **Modern** (default) — Uses Filament's [Modal Blade component](https://filamentphp.com/docs/3.x/support/blade-components/modal). You can customize the modal heading, [width](https://filamentphp.com/docs/3.x/support/blade-components/modal#changing-the-modal-width), or use a slide-over:\n\n    ```php\n    PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n        $panelSwitch\n            -\u003emodalHeading('Available Panels')\n            -\u003emodalWidth('sm')\n            -\u003eslideOver();\n    });\n    ```\n\n- **Simple** — A dropdown list for switching panels directly:\n\n    ```php\n    PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n        $panelSwitch-\u003esimple();\n    });\n    ```\n\nFor full control over the look and feel, you can publish the views and make your own adjustments:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-panel-switch-views\"\n```\n\n### Labels\nProvide custom labels for each panel. The keys should be valid panel IDs, and values can be strings or translatable strings:\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    $panelSwitch\n        -\u003elabels([\n            'admin' =\u003e 'Custom Admin Label',\n            'general_manager' =\u003e __('General Manager')\n        ]);\n});\n```\n\n### Icons\nDefine icons for each panel using the `icons()` method. The keys should be valid panel IDs:\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {    \n    $panelSwitch-\u003eicons([\n        'admin' =\u003e 'heroicon-o-square-2-stack',\n        'app' =\u003e 'heroicon-o-star',\n    ]);\n});\n```\n\nFor images instead of icons, set the `asImage` parameter to `true`:\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {    \n    $panelSwitch-\u003eicons([\n        'admin' =\u003e 'https://example.com/admin.jpg',\n        'app' =\u003e 'https://example.com/app.jpg',\n    ], asImage: true);\n});\n```\n\nUse `iconSize()` to customize the size (default `128px`). The value is multiplied by 4:\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    $panelSwitch-\u003eiconSize(32); // 128px\n});\n```\n\n### Sort Order\nBy default panels are listed in registration order, or in the order provided via `panels()`. Use `sort()` to sort alphabetically:\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    $panelSwitch\n        -\u003epanels(['admin', 'dev', 'app'])\n        -\u003esort();         // ascending: ['admin', 'app', 'dev']\n        // -\u003esort('desc') // descending: ['dev', 'app', 'admin']\n});\n```\n\n### Placement\nBy default the panel switch is rendered via the `panels::global-search.before` render hook. You can change this to any available Filament [Render Hook](https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks):\n\n```php\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    $panelSwitch-\u003erenderHook('panels::global-search.after');\n});\n```\n\n### Full Example\n\n```php\nuse BezhanSalleh\\PanelSwitch\\PanelSwitch;\n\nPanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {\n    $panelSwitch\n        -\u003epanels(['admin', 'app', 'dev'])\n        -\u003eheading('Available Panels')\n        -\u003emodalWidth('sm')\n        -\u003eslideOver()\n        -\u003eicons([\n            'admin' =\u003e 'heroicon-o-square-2-stack',\n            'app' =\u003e 'heroicon-o-star',\n        ])\n        -\u003eiconSize(16)\n        -\u003elabels([\n            'admin' =\u003e 'Admin Panel',\n            'app' =\u003e 'SaaS Application'\n        ]);\n        \n});\n```\n\n### Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nIf you want to contribute to this packages, you may want to test it in a real Filament project:\n\n* Fork this repository to your GitHub account.\n* Create a Filament app locally.\n* Clone your fork in your Filament app's root directory.\n* In the `/filament-panel-switch` directory, create a branch for your fix, e.g. `fix/error-message.`\n  \nInstall the packages in your app's `composer.json:`\n\n```php\n\"require\": {\n    \"bezhansalleh/filament-panel-switch\": \"dev-fix/error-message as main-dev\",\n},\n\"repositories\": [\n    {\n        \"type\": \"path\",\n        \"url\": \"filament-panel-switch\"\n    }\n]\n```\nNow, run composer update.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Bezhan Salleh](https://github.com/bezhanSalleh)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbezhanSalleh%2Ffilament-panel-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FbezhanSalleh%2Ffilament-panel-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FbezhanSalleh%2Ffilament-panel-switch/lists"}