Beartropy Tables
Install via Composer
Add the package to your Laravel project.
Install
Run this in your Laravel project root:
1composer require beartropy/tables
UI dependency included
beartropy/ui as a dependency. It will be installed automatically — you don't need to require it separately.
Database Migrations
Optional migrations for persisting user table preferences.
Publish & Run Migrations
If you want users to save their column arrangement and visibility preferences across sessions, publish the migrations and run them. This creates the yat_user_table_config table.
1php artisan vendor:publish --provider="Beartropy\\Tables\\YATProvider" --tag="migrations"2 3php artisan migrate
State Handler
Language Files
Customize labels and translations.
Publish Language Files
Optionally publish the language files to customize all table labels, button text, and messages.
1php artisan vendor:publish --provider="Beartropy\\Tables\\YATProvider" --tag="lang"
Tailwind CSS Setup
Configure Tailwind to scan the package views.
Tailwind v3 (tailwind.config.js)
Add the Tables and UI package paths to your tailwind.config.js so Tailwind can detect all utility classes used by the components.
1// tailwind.config.js 2export default { 3 presets: [ 4 //beartropy preset 5 require('./vendor/beartropy/ui/tailwind.config.js'), 6 ], 7 // ... 8 content: [ 9 './vendor/beartropy/tables/src/resources/views/**/*.php', 10 // ...beartropy assets11 './vendor/beartropy/ui/resources/views/**/*.php', 12 './vendor/beartropy/ui/src/Components/**/*.php', 13 ],14 darkMode: 'class',15 // ...16};
Tailwind v4 (CSS-based)
If you are using Tailwind CSS v4, use the CSS-based configuration in resources/css/app.css:
1@import "tailwindcss";2 3@config "../../vendor/beartropy/ui/tailwind.config.js"; 4 5@source "../../vendor/beartropy/tables/src/resources/views"; 6@source "../../vendor/beartropy/ui/resources/views"; 7@source "../../vendor/beartropy/ui/src/Components";
Build required
npm run build (or npm run dev) to recompile your assets.