Skip to content
Zonvoir Table LogoZonvoir Table

Installation & Setup

Install the Laravel package and Vue adapter to start using Zonvoir Table in your application. If you are new to the package, review the Introduction to Zonvoir Table and verify your environment meets the system requirements (PHP 8.3+, Laravel 11/12/13, Vue 3.4+).

Install Zonvoir Table using Composer:

Terminal window
composer require zonvoir/zonvoir-table

The package auto-discovers its service provider in Laravel.

Install the Vue adapter using your preferred JavaScript package manager:

Terminal window
npm install @zonvoir/zonvoir-table-vue

Or with pnpm:

Terminal window
pnpm add @zonvoir/zonvoir-table-vue

Or Yarn:

Terminal window
yarn add @zonvoir/zonvoir-table-vue

Import the Zonvoir Table stylesheet from your application’s JavaScript entry point:

import '@zonvoir/zonvoir-table-vue/style.css';

For example, in resources/js/app.ts:

import '../css/app.css';
import '@zonvoir/zonvoir-table-vue/style.css';

Import ZonvoirTable wherever you need to render a table:

<script setup lang="ts">
import { ZonvoirTable } from '@zonvoir/zonvoir-table-vue';
</script>

You can then render a table payload returned by your Laravel application:

<template>
<ZonvoirTable :table="users" />
</template>

If your application uses Tailwind CSS 4, add the Zonvoir Table package to your source scanning configuration:

@import "tailwindcss";
@source "../../node_modules/@zonvoir/zonvoir-table-vue/**/*.{js,vue}";

If you are using Tailwind CSS 3, add the package path to your tailwind.config.js content array:

module.exports = {
content: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./node_modules/@zonvoir/zonvoir-table-vue/**/*.{js,vue}',
],
};

This ensures Tailwind detects classes used by the Vue adapter when building your application’s CSS.

Zonvoir Table is now installed.

Create your first table using the Artisan generator:

Terminal window
php artisan make:zon-table UsersTable --model=User

Then pass the generated table to an Inertia page:

return inertia('Users', [
'users' => UsersTable::make(),
]);

And render it with the Vue adapter:

<script setup lang="ts">
import { ZonvoirTable } from '@zonvoir/zonvoir-table-vue';
defineProps<{
users: unknown;
}>();
</script>
<template>
<ZonvoirTable :table="users" />
</template>

Continue to Basic Usage to learn how to configure your first table, or see Generating Tables for Artisan scaffolding options.