A panel has been registered without an `id()`.
Hello, everyone. I have this AdminPanelProivder
Everything seems to be alright, but I'm still receiving the error 'A panel has been registered without an id().
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->default()
->id('admin')
->path('admin')
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->default()
->id('admin')
->path('admin')
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
Solution:Jump to solution
I received the same error after updating filament. I fixed it by moving plugins below id, so in your case, something like this should work:
```php
<?php
class AdminPanelProvider extends PanelProvider
{...
2 Replies
Solution
I received the same error after updating filament. I fixed it by moving plugins below id, so in your case, something like this should work:
I do not use a
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->default()
->id('admin')
->path('admin')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->default()
->id('admin')
->path('admin')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
viteTheme
, this might need moving too.Oh, thank you, is working now 🙏🏻