Make Form Component Utility Injection Can be Called from Custom Method
I got custom form field with several custom methods in it, i want to access utility injections ($get, $set, etc.) on my custom methods.
i tried
but got error that paramater $get is not passed.
Solution:Jump to solution
Also you need to call
$this->evaluate()
to evaluate your closure. Have a look at the Filament source code to see how it works.5 Replies
use
Filament\Forms\Get
still got an error @Hasnayeen
if you're using custom method then you need to use
Filament\Support\Concerns\EvaluatesClosures
Solution
Also you need to call
$this->evaluate()
to evaluate your closure. Have a look at the Filament source code to see how it works.ahh i see, will try it @Hasnayeen @Dennis Koch , thanks!