Basic Usage
Controller
Once you've configured your table with columns, filters, and other options, you can use the static make()
method to create a new table instance and pass it as a prop to the page.
php
use App\Tables\Users;
class UsersController
{
public function index()
{
return inertia('Users', [
'users' => Users::make(),
]);
}
}
Page
In your Vue component, you must import the Table
component and pass the users
prop as a resource to the component.
vue
<script setup>
import { Table } from 'inertiaui/table'
defineProps(['users']);
</script>
<template>
<AppLayout title="Users">
<Table :resource="users" />
</AppLayout>
</template>