Files
roxane/app/Filament/Resources/Services/Tables/ServicesTable.php
Nebulae 25885e3b70
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 1m21s
feat(Password process for new admin, cleaning translations)
2026-04-01 15:50:21 +02:00

54 lines
1.7 KiB
PHP

<?php
namespace App\Filament\Resources\Services\Tables;
use App\Models\Service;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class ServicesTable
{
public static function configure(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')
->label(Service::getAttributeLabel('name'))
->searchable(),
TextColumn::make('identifier')
->label(Service::getAttributeLabel('identifier'))
->searchable(),
IconColumn::make('icon')
->label(Service::getAttributeLabel('icon'))
->icon(fn (Service $record) => 'heroicon-o-'.$record->icon),
TextColumn::make('created_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
TextColumn::make('updated_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
TextColumn::make('deleted_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
->filters([
//
])
->recordActions([
EditAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
]);
}
}