filament/filament
v3
v11
v3
PHP 8.3
When serving a response outside of Filament, filament()->getCurrentPanel()
returns the default panel.
I reuse form schemas between Filament routes and public routes and would like to add conditional code to tweak various parameters.
I'd question whether these lines are needed in PanelRegistry
:
filament/packages/panels/src/PanelRegistry.php
Lines 21 to 32 in 085ba54
To me the default panel is not necessarily the current panel.
Happy to provide a PR if needed.
I would expect this return null
when not in a Filament context, especially considering the return type of the method is ?Panel
.
Execute
filament()->getCurrentPanel()
when not in a request served by Filament.
https://github.com/filamentphp/demo
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too