Closed atmonshi closed 1 month ago
so instead of using the plugin configuration, as a work around we can use the config only, and its work as expected but its not customizable per panel. what do you think of this approach!
I left the code in the plugin class as comments to get back to it later.
Do you happen to have a demo repo I can try all this out on? Honestly, I haven't even used the cluster feature so I don't have anything setup to test against.
ya I was procrastinating creating a reproduce repo to report to filament 😅
but here it is: https://github.com/atmonshi/issue-cluster
and I am using this fork: https://github.com/atmonshi/filament-curator/tree/cluster-panel
you'll see the error "Call to a member function getPlugin() on null", so you can disable ->cluster(Life::class)
here:
Awesome. Thanks. Just didn't want you to think I was ignoring this or didn't care. 😅
Is this not ready or a bug in filament? I couldn't get it to work.
this PR is using the config file only, so its like half way there, a temp solution.
reported the bug here: https://github.com/filamentphp/filament/issues/12532
if this fixed then I'll update this PR to use the plugin class based configuration, so it will be customizable per panel.
Ok. Can you change it back to draft until it's ready?
hey @awcodes, so it seems (cluster configuration from the panel) is not possible, as Dan explain:
as the cluster needs to be read when the routing is registered, and the panel may not be booted at that point so the plugins aren't there.
this PR is ready for a cluster configuration from the panel config file.
so if you want to merge it or not totally fine :) 🍻
So how does this work? Lol.
😂 will simply in config/curator.php:
'cluster' => \App\Filament\Clusters\Cms::class,
what I was hopping was to customize it per panel:
CuratorPlugin::make()
->cluster(\App\Filament\Clusters\Cms::class)
but got greedy, will have to convince the client its "better" this way lol
So, how is this different than over ridding the resource which is already possible?
less files to copy to the app :)
same idea for navigation_label
and other resources configuration.
~still draft... ... one moment plz.~
the issue