$record is null in selectColumn

I am facing an issue in below code. In 'Status' field I am getting $record collection. But, in 'fee_id' the $record is null. I unable to figure it out.
Tables\Columns\SelectColumn::make('Status')
->options(['Active' => 'Active', 'Hold' => 'Hold', 'Completed' => 'Completed'])
->default(function ($record) {
return $record->status;
}),
Tables\Columns\SelectColumn::make('fee_id')
->options(function ($record) {
$options = CourseFee::where('course_id', $record->course_id)->pluck('name', 'id');
return $options;
}),
Tables\Columns\SelectColumn::make('Status')
->options(['Active' => 'Active', 'Hold' => 'Hold', 'Completed' => 'Completed'])
->default(function ($record) {
return $record->status;
}),
Tables\Columns\SelectColumn::make('fee_id')
->options(function ($record) {
$options = CourseFee::where('course_id', $record->course_id)->pluck('name', 'id');
return $options;
}),
1 Reply
Venky
VenkyOP2y ago
Is there any other way to access current record This is working now after optimize clear. 🤔
Want results from more Discord servers?
Add your server