Skip to content

Artisan commands

make:inertia-table

Generate a dedicated table class under app/Tables:

bash
php artisan make:inertia-table TopicsTable
php artisan make:inertia-table Admin/TopicsTable --model=Content/Topic
Argument or optionMeaning
nameTable class name, optionally including subdirectories
--model=Eloquent model used by the generated class
--forceReplace an existing generated file

When --model is omitted, the command removes the Table suffix and infers a singular model name. Admin/TopicsTable, for example, uses App\Models\Topic. The generator refuses to replace an existing class unless --force is present.

Vendor publishing

bash
php artisan vendor:publish --tag=inertia-table-config
php artisan vendor:publish --tag=inertia-table-translations
php artisan vendor:publish --tag=inertia-table-migrations
TagUse it when
inertia-table-configGlobal defaults must differ from the package defaults
inertia-table-translationsLaravel-generated labels need application wording
inertia-table-migrationsThe application enables Saved Views

Run php artisan migrate after publishing the Saved View migration.

Released under the MIT License.