FilamentF
Filament3y ago
Gush

table layout without removing the column names row?

Hey, is there a way i can keep the column names above the table like the traditional filament table without the split

 public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Split::make([
                    TextColumn::make('name')
                        ->label(__('construction.construction_resource.name'))
                        ->sortable()
                        ->searchable(),
                    TextColumn::make('address')
                        ->label(__('construction.construction_resource.address'))
                        ->sortable()
                        ->searchable(),
                    TextColumn::make('landmark')
                        ->label(__('construction.construction_resource.landmark'))
                        ->sortable()
                        ->searchable(),
                    TextColumn::make('gps_coordinates')
                        ->sortable()
                        ->searchable()
                        ->label(__('construction.construction_resource.gps_coordinates')),
                    TextColumn::make('peak_power')
                        ->searchable()
                        ->sortable()
                        ->label(__('construction.construction_resource.peak_power')),
                    TextColumn::make('nominal_power')
                        ->searchable()
                        ->sortable()
                        ->label(__('construction.construction_resource.nominal_power')),
                    TextColumn::make('customers.name')
                        ->label(__('construction.construction_resource.customer'))
                        ->placeholder(__('construction.construction_resource.placeholder'))
                        ->sortable()
                        ->searchable(),
                    TextColumn::make('created_at')
                        ->toggleable(isToggledHiddenByDefault: true)
                        ->label(__('construction.construction_resource.created_at')),
                    TextColumn::make('user.name')
                        ->toggleable(isToggledHiddenByDefault: true)
                        ->label(__('construction.construction_resource.created_by'))
                        ->searchable(),
                ]),
                Panel::make([
                    Stack::make([
                        TextColumn::make('responsible_name')
                            ->placeholder('Não Definido')
                            ->searchable()
                            ->icon('heroicon-m-user'),
                        TextColumn::make('responsible_contact')
                            ->placeholder('Não Definido')
                            ->searchable()
                            ->icon('heroicon-m-phone'),
                        TextColumn::make('responsible_email')
                            ->placeholder('Não Definido')
                            ->searchable()
                            ->icon('heroicon-m-envelope'),
                    ]),
                ])->collapsible(),
            ])
Was this page helpful?