A Simple .env file Viewer plugin for your Filament Panels.
Provides features like, manage current .env variables, and a handy backup functionality page
You can install the package via composer:
composer require geo-sot/filament-env-editor
Add the GeoSot\FilamentEnvEditor\FilamentEnvEditorPlugin
to your panel config.
use GeoSot\FilamentEnvEditor\FilamentEnvEditorPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(
FilamentEnvEditorPlugin::make()
);
}
}
FilamentEnvEditorPlugin::make()
->navigationGroup('System Tools')
->navigationLabel('My Env')
->navigationIcon('heroicon-o-cog-8-tooth')
->navigationSort(1)
->slug('env-editor')
Some keys you may consider to be particularly sensitive and don't wish to expose them, even through this package. You can hide them through this interface:
FilamentEnvEditorPlugin::make()
->hideKeys('APP_KEY', 'BCRYPT_ROUNDS')
If you would like to prevent certain users from accessing the logs page, you should add a authorize
callback in the FilamentLEnvEditorPlugin chain.
FilamentEnvEditorPlugin::make()
->authorize(
fn () => auth()->user()->isAdmin()
)
To customize the "env-editor" page, you can extend the GeoSot\FilamentEnvEditor\Pages\ViewEnv
page and override its methods.
use GeoSot\FilamentEnvEditor\Pages\ViewEnv as BaseViewEnvEditor;
class ViewEnv extends BaseViewEnvEditor
{
// Your implementation
}
use App\Filament\Pages\ViewEnv;
FilamentEnvEditorPlugin::make()
->viewPage(CustomEnvPage::class)
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.