public function table(Table $table): Table
{
return $table
->query(Employee::query()->leftJoin('attendances','employees.id','=','attendances.employee_id'))
->columns([
TextColumn::make('first_name'), // column exists in Employee table and is showing
TextColumn::make('result'), // column exists in Attendances table but is NOT showing
])...
}
public function table(Table $table): Table
{
return $table
->query(Employee::query()->leftJoin('attendances','employees.id','=','attendances.employee_id'))
->columns([
TextColumn::make('first_name'), // column exists in Employee table and is showing
TextColumn::make('result'), // column exists in Attendances table but is NOT showing
])...
}