public function table(Table $table): Table
{
return $table
->heading('Siparişler')
->query(fn () => $this->user->orders())
->inverseRelationship('user')
->columns([
TextColumn::make('code')
->label('Sipariş numarası')
->searchable()
->prefix('#')
->copyable(),
TextColumn::make('totalPrice')
->money('TRY')
->label('Toplam tutar'),
TextColumn::make('created_at')
->label('Tarih')
->sortable()
->dateTime('M d, Y H:i')
])
->filters([
])
->actions([
Action::make('Görüntüle')
->icon('heroicon-o-eye')
->color('gray')
->url(fn ($record) => route('orders.success', $record))
])
->bulkActions([
])
->emptyStateIcon('sui-cart')
->emptyStateHeading('Hiç sipariş verilmemiş')
->emptyStateActions([
Action::make('shop')
->label('Alışverişe Başla')
->url(route('home'))
]);
}
public function table(Table $table): Table
{
return $table
->heading('Siparişler')
->query(fn () => $this->user->orders())
->inverseRelationship('user')
->columns([
TextColumn::make('code')
->label('Sipariş numarası')
->searchable()
->prefix('#')
->copyable(),
TextColumn::make('totalPrice')
->money('TRY')
->label('Toplam tutar'),
TextColumn::make('created_at')
->label('Tarih')
->sortable()
->dateTime('M d, Y H:i')
])
->filters([
])
->actions([
Action::make('Görüntüle')
->icon('heroicon-o-eye')
->color('gray')
->url(fn ($record) => route('orders.success', $record))
])
->bulkActions([
])
->emptyStateIcon('sui-cart')
->emptyStateHeading('Hiç sipariş verilmemiş')
->emptyStateActions([
Action::make('shop')
->label('Alışverişe Başla')
->url(route('home'))
]);
}