FilamentFilament::getCurrentPanel() outside panel issue
I was expecting that Filament::getCurrentPanel() will return null if I am accessing it outside the panel like a public facing page but instead it returns the value of my panel...
4 Replies
Iirc, current panel returns the default panel if no panel currently set.
I believe that behavior has changed in v4 though.
What are you trying to do, there may be another way to accomplish it.
Thanks! I have this local scope and I dont want to apply it in the public facing pages.. so what I did was to use this
request()->routeIs('filament.*')
that is my work around..You can use
Filament::serving(fn () => )
callback to run only on Filament pages.cool! i didn't know this