public function table(Table $table): Table
{
return $table
->query(Product::query()->with('category'))
->columns([
Stack::make([
View::make('products.table.product-card'),
]),
])
->contentGrid([
'md' => 2,
'lg' => 3,
])
->filters([
SelectFilter::make('categories')
->relationship('category', 'name')
->multiple()
->preload()
->searchable(),
], layout: FiltersLayout::BeforeContent)
->hiddenFilterIndicators()
->paginated([10])
->deferFilters(false);
}
public function table(Table $table): Table
{
return $table
->query(Product::query()->with('category'))
->columns([
Stack::make([
View::make('products.table.product-card'),
]),
])
->contentGrid([
'md' => 2,
'lg' => 3,
])
->filters([
SelectFilter::make('categories')
->relationship('category', 'name')
->multiple()
->preload()
->searchable(),
], layout: FiltersLayout::BeforeContent)
->hiddenFilterIndicators()
->paginated([10])
->deferFilters(false);
}