$table
->relationship(fn (): HasMany => getAsUser()->profile->products())
->recordTitleAttribute('wording')
->emptyStateDescription('Ajouter un produit pour commencer')
->headerActions([
])
->columns([
TextColumn::make('wording')
->label('Libellé')
->weight(FontWeight::Bold)
->sortable(),
TextColumn::make('category')
->label('Catégorie')
->badge()
->sortable()
->toggleable(),
TextColumn::make('created_at')
->label('Date d\'ajout')
->date('d/m/Y', \getAsUser()->timezone)
->sortable(),
])
->filters([
SelectFilter::make('category')
->label('Catégorie')
->options(ProductCategory::class)
->native(false)
])
->actions([
])
->bulkActions([
]);
$table
->relationship(fn (): HasMany => getAsUser()->profile->products())
->recordTitleAttribute('wording')
->emptyStateDescription('Ajouter un produit pour commencer')
->headerActions([
])
->columns([
TextColumn::make('wording')
->label('Libellé')
->weight(FontWeight::Bold)
->sortable(),
TextColumn::make('category')
->label('Catégorie')
->badge()
->sortable()
->toggleable(),
TextColumn::make('created_at')
->label('Date d\'ajout')
->date('d/m/Y', \getAsUser()->timezone)
->sortable(),
])
->filters([
SelectFilter::make('category')
->label('Catégorie')
->options(ProductCategory::class)
->native(false)
])
->actions([
])
->bulkActions([
]);