Tables\Columns\TextColumn::make('customer_id')
->label('Customer Name')
->formatStateUsing(function ($record, string $state): string{
switch ($record->customer_type) {
case 'student':
return Student::where('id', $state)->select(['first_name','last_name'])->get();
// dd($data);
break
Tables\Columns\TextColumn::make('customer_id')
->label('Customer Name')
->formatStateUsing(function ($record, string $state): string{
switch ($record->customer_type) {
case 'student':
return Student::where('id', $state)->select(['first_name','last_name'])->get();
// dd($data);
break