F
Filamentโ€ข16mo ago
Karel

isPersistent middleware does not seem to be working on Tabs.

When using the Tabs feature on the list page of a resource, while having a custom middleware applied (which adds global scopes on certain conditions) the tabs only work when the page is loaded. The middleware is added through the AdminPanelProvider inside the 'authMiddleware' method. On subsequent requests the middleware is not being applied (even when the 'isPersisted' boolean is set to true). The only way I've got it to work is to add:
Livewire::addPersistentMiddleware([
MyMiddleware::class,
]);
Livewire::addPersistentMiddleware([
MyMiddleware::class,
]);
To the AppServiceProvider's 'boot' method. Anyone has an idea on why the middleware is not being persisted when set in the PanelProvider? If this seems unclear please let me know and I will set up an empty project to test this further. Seems like a bug in Filament but I'm not sure, so I wanted to check if someone else had the same issue before filing one in GitHub. ๐Ÿ–๏ธ
Solution:
Fixed in v3.0.50
Jump to solution
1 Reply
Solution
Karel
Karelโ€ข15mo ago
Fixed in v3.0.50
Want results from more Discord servers?
Add your server