F
Filamentβ€’11mo ago
Walid

Showing resource in all panels

Hi, is there any way to create resource in all panels, or should i create it to every panel ?
Solution:
i duplicate ->discoverResources() and it work's, Thank you so mush ``` ->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources') ->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\Filament\App\Resources') ...
Jump to solution
3 Replies
bernhard
bernhardβ€’11mo ago
You define yourself, which resources a panel should use. In your PanelProvider
return $panel->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources');
return $panel->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources');
I haven't tried it out if it works, but you could make multiple resources folders, specific for each panel and one shared. Something like: - Filament/PanelA/Resources - Filament/PanelB/Resources - Filament/Shared/Resources and then registert the specific one and the shared one in the corresponding panel service provider. Would be interesting, if this works
Solution
Walid
Walidβ€’11mo ago
i duplicate ->discoverResources() and it work's, Thank you so mush

->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources')

->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources')
bernhard
bernhardβ€’11mo ago
You are welcome. Please mark this question as solved πŸ˜‰
Want results from more Discord servers?
Add your server
More Posts