What's New in the Filament Access Secret v3.0 Plugin

Published on by Dasun Tharanga

1 min read

✨ Introduction

The multiple panel feature was introduced in FilamentPHP v3.0. Therefore, I have decided to enable this feature in the filament access secret plugin as well, and now it supports for multiple panels with different secret keys.

🔥 Multiple Panel Support

To enable this, you must publish the configuration file by running the following command.

1php artisan vendor:publish --tag="filament-access-secret-config"

Then open the config file at config/filament-access-secret.php and add your new key with the env variable as follows.

1<?php
2 
3return [
4 
5 /*
6 |--------------------------------------------------------------------------
7 | Access Secret Key
8 |--------------------------------------------------------------------------
9 |
10 | Set this to a secure value to restrict access to Filament admin panel.
11 |
12 */
13 
14 'keys' => [
15 'default' => env('DEFAULT_FILAMENT_ACCESS_SECRET_KEY', ''),
16 'app' => env('APP_FILAMENT_ACCESS_SECRET_KEY', ''),
17 ],
18 
19 /*
20 |--------------------------------------------------------------------------
21 | Access Secret Cookie
22 |--------------------------------------------------------------------------
23 |
24 | To use your own access secret cookie, set it here.
25 |
26 */
27 
28 'cookie' => \Dasundev\FilamentAccessSecret\DefaultAccessSecretCookie::class,
29];

Now you can set a secret key for the new panel (in this case for the "app" panel).

1APP_FILAMENT_ACCESS_SECRET_KEY=app123

If you are using FilamentPHP as the admin panel of your Laravel application, you should consider using this plugin, as it adds an extra layer of security.

See y'all in the next post!

Get notified for the next blog post? Sign up for the newsletter.