Question about tables
I have the following table. But I would like the backup_date to appear as a column and show the result of each server on each date. It's possible?
public function table(Table $table): Table
{
return $table
->query(Backup::query()
->select(
'backups.backup_date',
'backups.backup_status',
'backups.observations',
'servers.name as server_name'
)
->join('servers', 'backups.server_id', '=', 'servers.id'))
->columns([
Tables\Columns\TextColumn::make('server_name')
->sortable(),
Tables\Columns\TextColumn::make('backup_date'),
Tables\Columns\TextColumn::make('backup_status'),
])
->defaultSort('backup_date')
->paginated(false);
}public function table(Table $table): Table
{
return $table
->query(Backup::query()
->select(
'backups.backup_date',
'backups.backup_status',
'backups.observations',
'servers.name as server_name'
)
->join('servers', 'backups.server_id', '=', 'servers.id'))
->columns([
Tables\Columns\TextColumn::make('server_name')
->sortable(),
Tables\Columns\TextColumn::make('backup_date'),
Tables\Columns\TextColumn::make('backup_status'),
])
->defaultSort('backup_date')
->paginated(false);
}