Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify panel default() method to accept closure #15817

Merged
merged 1 commit into from
Mar 9, 2025

Conversation

binaryfire
Copy link
Contributor

@binaryfire binaryfire commented Mar 9, 2025

I've got 2 separate domains with their own guards, panels and auth pages. I'm running into issues when Filament uses default() under the hood because each domain needs a different default panel. Closures make the default() method more flexible and allow for things like this:

// Admin domain default panel
->default(fn (): bool => CurrentDomain::isAdminDomain())

// Member domain default panel
->default(fn (): bool => CurrentDomain::isMemberDomain())

@binaryfire binaryfire changed the title Modify panel default method to accept closure Modify panel default() method to accept closure Mar 9, 2025
@binaryfire binaryfire changed the title Modify panel default() method to accept closure Modify panel default() method to accept closure Mar 9, 2025
@danharrin danharrin added the enhancement New feature or request label Mar 9, 2025
@danharrin danharrin added this to the v3 milestone Mar 9, 2025
@danharrin danharrin merged commit f1cd0da into filamentphp:3.x Mar 9, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants