Closed eelco2k closed 9 months ago
When having multiple Filament Panels the same cached image returns for each panel. even though i've registered another imageProvider
create multiple filament panels
one panel add
$panel->plugin([FilamentBackgroundsPlugin::make()->remember(60)]
other panel add:
$panel2->plugin([FilamentBackgroundsPlugin::make()->imageProvider(Triangles::make())->remember(60)]
open both panels with login page.
proposed update:
in FilamentBackgroundsPlugin.php change this function so that it gets the correct cached image per filament panel:
protected function getImage(): Image { return Cache::remember( Filament::getCurrentPanel()->getId() ?? '' . 'filament-backgrounds:image', $this->ttl, fn () => ($this->imageProvider ?? CuratedBySwis::make())->getImage() ); }
1.1.1
8.3.2
10
No response
Good catch, thanks for reporting! Fixed in 1.1.2.
What happened?
When having multiple Filament Panels the same cached image returns for each panel. even though i've registered another imageProvider
How to reproduce the bug
create multiple filament panels
one panel add
other panel add:
open both panels with login page.
proposed update:
in FilamentBackgroundsPlugin.php change this function so that it gets the correct cached image per filament panel:
Package Version
1.1.1
PHP Version
8.3.2
Laravel Version
10
Which operating systems does with happen with?
No response
Notes
No response