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

Support closures in floating() and colored() methods #25

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

rhiannonjourney
Copy link
Contributor

This pull request adds support for passing a closure to the floating() and colored() methods.

I think all of the changes are pretty straightforward, but I did have to move the FilamentAsset::registerScriptData() call into the boot() method instead of the register() method because certain things, like accessing auth()->user(), don't work if the closures are evaluated when the plugin is registered.

@awcodes
Copy link
Owner

awcodes commented Oct 20, 2023

Thanks

@awcodes awcodes merged commit 91ee828 into awcodes:2.x Oct 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants