Download the PHP package pxlrbt/filament-environment-indicator without Composer
On this page you can find all versions of the php package pxlrbt/filament-environment-indicator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pxlrbt/filament-environment-indicator
More information about pxlrbt/filament-environment-indicator
Files in pxlrbt/filament-environment-indicator
Package filament-environment-indicator
Short Description Indicator for the current environment inside Filament
License MIT
Informations about the package filament-environment-indicator
Filament Environment Indicator
Never confuse your tabs with different Filament environments again.
Installation via Composer
Plugin Version | Filament Version | PHP Version |
---|---|---|
1.x | ^2.9.15 | > 8.0 |
2.x | 3.x | > 8.1 |
Usage
To use this plugin register it in your panel configuration:
Configuration
Out of the box, this plugin adds a colored border to the top of the admin panel and a badge next to the search bar.
You can customize any behaviour via the plugin object.
Customizing the view
Use php artisan vendor:publish --tag="filament-environment-indicator-views"
to publish the view to the resources/views/vendor/filament-environment-indicator
folder. After this you can customize it as you wish!
Visibility
By default, the package checks whether you have Spatie permissions plugin installed and checks for a role called super_admin
. You can further customize whether the indicators should be shown.
Colors
You can overwrite the default colors if you want your own colors or need to add more. The ->color()
method accepts any Filament's Color object or a closure that returns a color object.
Indicators
By default, both indicators are displayed on non-production environments. You can turn them off separately.
Git Branch
You can enable the display of the current git branch in the badge via ->showGitBranch()
. This requires the exec()
function to be enabled in your PHP configuration.
Contributing
If you want to contribute to this packages, you may want to test it in a real Filament project:
- Fork this repository to your GitHub account.
- Create a Filament app locally.
- Clone your fork in your Filament app's root directory.
- In the
/filament-environment-indicator
directory, create a branch for your fix, e.g.fix/error-message
.
Install the packages in your app's composer.json
:
Now, run composer update
.
Credits
- Dennis Koch
- All Contributors