Files
roxane/app/Filament/Resources/Services/Tables/ServicesTable.php
Nebulae f39651748d
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 1m29s
wip(Member & memberships sections)
2026-02-03 10:53:23 +01:00

55 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\Support\Icons\Heroicon;
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('Icône')
->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(),
]),
]);
}
}