FilamentF
Filament16mo ago
morty

What does `->evaluate()` do?

I see this all over the code base but not really understanding entirely what it's doing. Can someone explain?
Solution
It handles callbacks that are passed into methods. Ie, if you pass a closure in to something like ->required() the evaluate will run that closure when using $isRequired() in a blade view for example. It also handles dependency injection.
Was this page helpful?