F
Filament14mo ago
Anouar

erreur

i still have erreur in this function Tables\Columns\TextColumn::make('Books')->getStateUsing( function ($author) { return (string)$author->books()->count(); } ) ->sortable(), erreur : An attempt was made to evaluate a closure for [Filament\Tables\Columns\TextColumn], but [$author] was unresolvable.
2 Replies
awcodes
awcodes14mo ago
Change $author to $record. If you don’t type hint it the only way it can be injected in a callback is by calling it $record.
Anouar
AnouarOP14mo ago
thaaaank yyou
Want results from more Discord servers?
Add your server