class Testing extends Component implements HasTable
{
use InteractsWithTable;
public $showHeaderActionsButton = false;
protected function getTableQuery(): Builder|Relation
{
return PromoHeader::query();
}
protected function getTableHeaderActions(): array
{
return [
Action::make('testing')
->label('Test')
->button()
->action(fn () => dd('hello'))
// ->extraAttributes([
// 'x-show' => '! $wire.showHeaderActionsButton'
// ])
->hidden($this->showHeaderActionsButton)
];
}
protected function getTableColumns(): array
{
return [
TextColumn::make('id'),
TextColumn::make('updated_at'),
];
}
}
class Testing extends Component implements HasTable
{
use InteractsWithTable;
public $showHeaderActionsButton = false;
protected function getTableQuery(): Builder|Relation
{
return PromoHeader::query();
}
protected function getTableHeaderActions(): array
{
return [
Action::make('testing')
->label('Test')
->button()
->action(fn () => dd('hello'))
// ->extraAttributes([
// 'x-show' => '! $wire.showHeaderActionsButton'
// ])
->hidden($this->showHeaderActionsButton)
];
}
protected function getTableColumns(): array
{
return [
TextColumn::make('id'),
TextColumn::make('updated_at'),
];
}
}