Build & Deploy / build (push) Successful in 18s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Users\Tables;
|
|
|
|
use Filament\Actions\BulkActionGroup;
|
|
use Filament\Actions\DeleteBulkAction;
|
|
use Filament\Actions\EditAction;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
/**
|
|
* Table des utilisateurs : identité, préférences d'affichage, date d'inscription.
|
|
*/
|
|
class UsersTable
|
|
{
|
|
public static function configure(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
TextColumn::make('name')
|
|
->label('Nom')
|
|
->searchable()
|
|
->sortable(),
|
|
TextColumn::make('email')
|
|
->label('Email')
|
|
->searchable()
|
|
->sortable(),
|
|
TextColumn::make('locale')
|
|
->label('Langue')
|
|
->badge(),
|
|
TextColumn::make('units')
|
|
->label('Unités')
|
|
->badge(),
|
|
TextColumn::make('created_at')
|
|
->label('Inscrit le')
|
|
->dateTime()
|
|
->sortable(),
|
|
])
|
|
->recordActions([
|
|
EditAction::make(),
|
|
])
|
|
->toolbarActions([
|
|
BulkActionGroup::make([
|
|
DeleteBulkAction::make(),
|
|
]),
|
|
])
|
|
->defaultSort('created_at', 'desc');
|
|
}
|
|
}
|