mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Fix panel objects shared between requests
This commit is contained in:
@@ -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)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user