bezhanSalleh / filament-language-switch

A versatile and user-friendly plugin designed for Filament Panels.
MIT License
210 stars 45 forks source link

Update FilamentLanguageSwitchPlugin.php #49

Closed albertobenavides closed 11 months ago

albertobenavides commented 1 year ago

Added visible option.

In the panel plugin section, you can do:

\BezhanSalleh\FilamentLanguageSwitch\FilamentLanguageSwitchPlugin::make()->visible(false) # or true
Saifallak commented 11 months ago

this would be better if accepts Clouser, so we can dynamically show it or hide,

personally i can't think of use case,

but why hide it? if we can just un-register it, or else show/hide dynamically.

albertobenavides commented 11 months ago

@Saifallak, in earlier versions of filament, the language selected in app/config was not applied, so I used this package to select that language. Now, it works as intended so this thread is obsolete.