PHPackages                             ivanmercedes/laravel-forminertia - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ivanmercedes/laravel-forminertia

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ivanmercedes/laravel-forminertia
================================

A plug-and-play form builder for Laravel’s Inertia Starter Kit — powered by ShadCN UI.

v1.0.0-beta(6mo ago)31[2 PRs](https://github.com/ivanmercedes/laravel-forminertia/pulls)MITPHPPHP ^8.4CI passing

Since Nov 6Pushed 1mo agoCompare

[ Source](https://github.com/ivanmercedes/laravel-forminertia)[ Packagist](https://packagist.org/packages/ivanmercedes/laravel-forminertia)[ Docs](https://github.com/ivanmercedes/laravel-forminertia)[ GitHub Sponsors](https://github.com/laravel-forminertia)[ RSS](/packages/ivanmercedes-laravel-forminertia/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (5)Used By (0)

Laravel Forminertia
===================

[](#laravel-forminertia)

A plug-and-play form builder for Laravel’s Inertia Starter Kit — powered by ShadCN UI.

[![Latest Version on Packagist](https://camo.githubusercontent.com/4d3b1fe845df57bcdd13d5ee9d15416ffdbb9c25bdadc80dd5097a9b12a13040/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6976616e6d657263656465732f6c61726176656c2d666f726d696e65727469612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ivanmercedes/laravel-forminertia)[![GitHub Tests Action Status](https://camo.githubusercontent.com/b9422eccbfa5dd244f227b6eb3219b0de5685094b2ac8217c6ca915c291b3c87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6976616e6d657263656465732f6c61726176656c2d666f726d696e65727469612f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ivanmercedes/laravel-forminertia/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/54fbe2e53dacf27dc1e7a0a6f296e69226b5d23ef19b783f5e93f8073af5d294/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6976616e6d657263656465732f6c61726176656c2d666f726d696e65727469612f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ivanmercedes/laravel-forminertia/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bf8840443aca44da80557c7ec6511d968bec5b0c298a9016205ab8fbc8d66afd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6976616e6d657263656465732f6c61726176656c2d666f726d696e65727469612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ivanmercedes/laravel-forminertia)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ivanmercedes/laravel-forminertia
```

Then run the installation command to publish the default resources:

```
php artisan forminertia:install
```

Auto-Generate Forms from Database Tables
----------------------------------------

[](#auto-generate-forms-from-database-tables)

FormInertia can automatically generate form classes based on your database table structure, similar to Filament's generate command:

```
# Generate form from model/table
php artisan forminertia:generate User

# Generate with custom table name
php artisan forminertia:generate User --table=custom_users

# Exclude specific columns
php artisan forminertia:generate User --exclude=password,remember_token

# Force overwrite existing form
php artisan forminertia:generate User --force

# Custom output path
php artisan forminertia:generate User --path=app/Forms/Custom/UserForm.php
```

The command will:

- Analyze your table structure
- Map column types to appropriate form fields
- Generate validation rules based on nullable columns
- Exclude common system columns (id, timestamps, etc.)
- Create a ready-to-use form class

**Example generated form:**

```
