Actions Column
PHP Setup
Use ActionsColumn to define where the actions column appears:
php
use Forjed\InertiaTable\Columns\ActionsColumn;
protected function columns(): array
{
return [
LinkColumn::make('name', 'Name')->route('servers.show', ['server' => ':id'])->sortable(),
EnumColumn::make('status', 'Status')->sortable(),
ActionsColumn::make(), // actions render here
Column::data('id'), // hidden data available in actions
Column::data('can_delete', fn ($m) => $m->canBeDeleted()),
];
}If you don't add ActionsColumn to your PHP columns but pass an actions prop (React) or use the #actions slot (Vue) on the frontend, the actions column is auto-appended at the end.
Frontend Rendering
tsx
<InertiaTable
tableData={servers}
actions={(row) => (
<div className="flex gap-2">
<button onClick={() => editServer(row)}>Edit</button>
{row.can_delete && (
<button onClick={() => deleteServer(row.id)}>Delete</button>
)}
</div>
)}
/>template
<InertiaTable :table-data="servers">
<template #actions="{ row }">
<div class="flex gap-2">
<button @click="editServer(row)">Edit</button>
<button v-if="row.can_delete" @click="deleteServer(row.id)">Delete</button>
</div>
</template>
</InertiaTable>The actions callback (React) or #actions scoped slot (Vue) receives the full row data, including hidden Column::data() fields like id and can_delete.