Getting Error While using filament table as dashboard widget #8575
-
I used the above code to join 2 tables and output the array using the table in filament but got the below error. Filament\Widgets\TableWidget::getTableRecordKey(): Return value must be of type string, null returned; |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Never mind, the issue was what I was trying to select from my db(just selecting a name from the table) so filament was claiming me for that. I added ID too when I selected it from the table and the error was gone. |
Beta Was this translation helpful? Give feedback.
-
public function getTableRecordKey(Model $record): string |
Beta Was this translation helpful? Give feedback.
-
This worked for me |
Beta Was this translation helpful? Give feedback.
Never mind, the issue was what I was trying to select from my db(just selecting a name from the table) so filament was claiming me for that. I added ID too when I selected it from the table and the error was gone.