columns([ TextColumn::make('name') ->label('Name') ->searchable() ->sortable(), TextColumn::make('slug') ->label('Slug') ->copyable() ->searchable() ->sortable(), TextColumn::make('paper') ->label('Papier') ->sortable(), TextColumn::make('orientation') ->label('Ausrichtung') ->sortable(), BadgeColumn::make('is_active') ->label('Status') ->colors([ 'success' => fn ($state) => $state === true, 'gray' => fn ($state) => $state === false, ]) ->getStateUsing(fn ($record) => $record->is_active) ->formatStateUsing(fn ($state) => $state ? 'Aktiv' : 'Inaktiv'), TextColumn::make('updated_at') ->label('Aktualisiert') ->dateTime('d.m.Y H:i') ->sortable(), ]) ->filters([ SelectFilter::make('is_active') ->label('Status') ->options([ '1' => 'Aktiv', '0' => 'Inaktiv', ]) ->query(function ($query, $state) { if ($state === '1') { $query->where('is_active', true); } elseif ($state === '0') { $query->where('is_active', false); } }), ]) ->recordActions([ EditAction::make(), DeleteAction::make(), ]) ->toolbarActions([ BulkActionGroup::make([ DeleteBulkAction::make(), ]), ]); } }