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.
This pull request adds support for passing a closure to the
floating()
andcolored()
methods.I think all of the changes are pretty straightforward, but I did have to move the
FilamentAsset::registerScriptData()
call into theboot()
method instead of theregister()
method because certain things, like accessingauth()->user()
, don't work if the closures are evaluated when the plugin is registered.