Download the PHP package bezhansalleh/filament-panel-switch without Composer

On this page you can find all versions of the php package bezhansalleh/filament-panel-switch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-panel-switch

Panel Switch

FILAMENT 4.x FILAMENT 5.x Packagist Code Style Passing Downloads

Panel Switch

The Panel Switch Plugin for Filament offers a robust and customizable component for switching between panels in applications built with FilamentPHP.

Demo Demo Demo

Table Of Contents

Compatibility

Package Version Filament Version
1.x 3.x
2.x 4.x & 5.x
3.x - current 4.x & 5.x

Installation

You can install the package via composer:

[!IMPORTANT] 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:

Now build your theme using:


Upon installation, the Plugin seamlessly integrates with Filament without any further setup. Though the plugin works out-of-the-box, it's designed for customization. Delve into the Configuration section below for detailed customization options.

Configuration

Start your custom configuration using the configureUsing method in your service provider's boot method:

Panel Access & Navigation

The 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.

To further limit which panels appear in the switch, use the panels() method:

The 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.

Design or Style

The plugin supports two design styles:

For full control over the look and feel, you can publish the views and make your own adjustments:

Labels

Provide custom labels for each panel. The keys should be valid panel IDs, and values can be strings or translatable strings:

Icons

Define icons for each panel using the icons() method. The keys should be valid panel IDs:

For images instead of icons, set the asImage parameter to true:

Use iconSize() to customize the size (default 128px). The value is multiplied by 4:

Sort Order

By default panels are listed in registration order, or in the order provided via panels(). Use sort() to sort alphabetically:

Placement

By default the panel switch is rendered via the panels::global-search.before render hook. You can change this to any available Filament Render Hook:

Full Example

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

If you want to contribute to this packages, you may want to test it in a real Filament project:

Install the packages in your app's composer.json:

Now, run composer update.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-panel-switch with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
filament/filament Version ^4.0|^5.0
illuminate/support Version ^11.28|^12.0|^13.0
league/uri Version ^7.0
spatie/laravel-package-tools Version ^1.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bezhansalleh/filament-panel-switch contains the following files

Loading the files please wait ...