Martin Oscar
Martin Oscar
Explore posts from servers
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Well lets forget the whole override thing imagine i want to use
$panel->revealablePasswords(config('panel.password.revealable'))
$panel->revealablePasswords(config('panel.password.revealable'))
instead the fields still aren't revealable() even though that var is true @see
Also i don't know why but they are not revealable() by default unless i tell the component to be even if (bool) $panel->arePasswordsRevealable = true
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Don't worry we've tried stuff and even though it didn't work we both learned move Filament so i guess kinda win ? Yeah if it ain't broke don't fix it 🤪
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
I see, that's what i'v done without success, it works for you cause its setting "hardcoded" stuff whereas i need to check if the $component has the bool isPassword = true Also you should put
->brandLogo(asset('img/hrlink-logo.svg'))
->darkModeBrandLogo(asset('img/hrlink-logo-light.svg'));
->brandLogo(asset('img/hrlink-logo.svg'))
->darkModeBrandLogo(asset('img/hrlink-logo-light.svg'));
under your PanelProvider
public function panel(Panel $panel): Panel
return $panel
public function panel(Panel $panel): Panel
return $panel
instead of a register method @see Assuming you are using Filament 3.x
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Is your code opensource so i can take a look at it ?
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Did you ever overcome the issue yourself with either of those methods ?
Im afraid i'll have to use something like
TextInput::macro('password', function () {
return $this->password()->revealable(config('panel.password.revealable'));
});
TextInput::macro('password', function () {
return $this->password()->revealable(config('panel.password.revealable'));
});
Edit macros doesn't work for that either
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Ok so i made a middleware with a configureUsing() method and added it to $panel->middleware([]) inside AdminPanelProvider but the debug no longer appears on the page so it doesn't seem like it cares one bit
Moved it to handle(), debug is back but it still always returns false
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Thanks for trying to help me still
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
It gets called out i see the dump on the page but it still gets called before the component is actually made
dump($component->isPassword(), $component->getLabel());

produces :
false // app/Providers/ConfigurationServiceProvider.php:17

"Username" // app/Providers/ConfigurationServiceProvider.php:17

false // app/Providers/ConfigurationServiceProvider.php:17

"Email" // app/Providers/ConfigurationServiceProvider.php:17

false // app/Providers/ConfigurationServiceProvider.php:17

"Password" // app/Providers/ConfigurationServiceProvider.php:17

false // app/Providers/ConfigurationServiceProvider.php:17

"Password confirmation" // app/Providers/ConfigurationServiceProvider.php:17
dump($component->isPassword(), $component->getLabel());

produces :
false // app/Providers/ConfigurationServiceProvider.php:17

"Username" // app/Providers/ConfigurationServiceProvider.php:17

false // app/Providers/ConfigurationServiceProvider.php:17

"Email" // app/Providers/ConfigurationServiceProvider.php:17

false // app/Providers/ConfigurationServiceProvider.php:17

"Password" // app/Providers/ConfigurationServiceProvider.php:17

false // app/Providers/ConfigurationServiceProvider.php:17

"Password confirmation" // app/Providers/ConfigurationServiceProvider.php:17
it goes on and on but i cut it so i don't flood
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Do you need to import the ConfigurationServiceProvider somewhere else for it to get called later or bootstrap/providers.php should do the job ? cause mine is still too early just like if i made that under boot no change at all
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
I tried putting it under AppServiceProvider::register() seems like it still is too early
23 replies
FFilament
Created by Martin Oscar on 10/18/2024 in #❓┊help
use `configureUsing` to avoid repetition
Not sure im doing this quite right where should i put the register() method ?
23 replies