FilamentF
Filament3y ago
Gush

Adminpanel settings change in App

hello all, i need help understanding how can i dynamicly change a configuration in Adminpanel

my example is
->passwordReset()

and i want to have a toggle form to change this to either true or false

what would be the best approach?
Thank you
Solution
for starters, don't use env() outside of a config file. You'll run into potential caching issues.

try this
$panel
  ->bootUsing(function(Panel $panel) {
    if (checkPasswordRecoveryHere) {
      $panel->passwordReset();
    }
  });
Was this page helpful?