Installation
This is the installation guide for Inertia Table v2.x. If you're still using v1.x, consider upgrading to the latest version. For v1.x installation instructions, please refer to the old v1.x installation guide.
Composer Authentication
To install Inertia Table, you need a valid license. In the Inertia UI portal, you can find your license key or buy one.
Satis Repository
First, add the Inertia UI Composer repository to your composer.json
file:
"repositories": [
{
"type": "composer",
"url": "https://satis.inertiaui.com"
}
]
Authentication
Then run the following command to authenticate with the Inertia UI Composer repository:
composer config --global --auth http-basic.satis.inertiaui.com "your-email-address" "your-license-key"
This will store your credentials in the auth.json
file in your home directory. If you're using Laravel Forge, you can add the credentials on the Composer Package Authentication screen of your server's settings. This will allow you to install our packages without having to run the composer config command on your server.
Installation
Now you can install Inertia Table using Composer:
composer require inertiaui/table
NPM Installation
After installing the package, you can link the React or Vue package into your project. This will create a symlink in your node_modules
directory to the package in the vendor
directory.
npm install vendor/inertiaui/table/vue
npm install vendor/inertiaui/table/react
Only for Inertia Table v2.x
In Inertia Table v1.x, we used an alias in the vite.config.js
file to link the package. This is has been replaced with the npm install
command in v2.x.
Tailwind Configuration
Inertia Table uses Tailwind CSS for styling. You need to include the package path in the content array of your tailwind.config.js
file:
export default {
content: [
'./vendor/inertiaui/table/vue/src/**/*.vue',
// other paths...
]
}
export default {
content: [
'./vendor/inertiaui/table/react/src/**/*.jsx',
// other paths...
]
}
Vite Configuration
As described in the NPM Installation section, there was some additional Vite configuration required to use Inertia Table in v1.x. This is no longer necessary in v2.x.
Action and Export routes
Inertia Table requires two routes to execute actions and export data. The package registeres a macro on the Route
facade to make this easier. Add the following code to your web.php
file:
Route::inertiaTable();
Date Picker styling
Inertia Table uses the React DayPicker and Vue datepicker libraries for date filtering. You need to include the CSS file for the date picker in your project. You can do this by adding the following line to your app.js
file:
import '@inertiaui/table-vue/style.css'
import '@inertiaui/table-react/style.css'