F
Filament9mo 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
awcodes9mo 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
Anouar9mo ago
thaaaank yyou