Fix panel objects shared between requests

This commit is contained in:
Dan Harrin
2023-11-25 23:32:00 +00:00
parent 72726399d9
commit 8aa2b894ea
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -121,11 +121,11 @@ class Filament extends Facade
return 'filament';
}
public static function registerPanel(Panel $panel): void
public static function registerPanel(Panel | Closure $panel): void
{
static::getFacadeApplication()->resolving(
static::getFacadeAccessor(),
fn (FilamentManager $filamentManager) => $filamentManager->registerPanel($panel),
fn (FilamentManager $filamentManager) => $filamentManager->registerPanel(value($panel)),
);
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ abstract class PanelProvider extends ServiceProvider
public function register(): void
{
Filament::registerPanel(
$this->panel(Panel::make()),
fn (): Panel => $this->panel(Panel::make()),
);
}
}