Download the PHP package khodakhah/laravel-inertia-form without Composer
On this page you can find all versions of the php package khodakhah/laravel-inertia-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khodakhah/laravel-inertia-form
More information about khodakhah/laravel-inertia-form
Files in khodakhah/laravel-inertia-form
Package laravel-inertia-form
Short Description A package for Inertia.js forms integration in Laravel
License MIT
Informations about the package laravel-inertia-form
laravel-inertia-form
A simple package to handle forms in Laravel with InertiaJS.
This is the backend pair of InertiaForm package.
Requirements
- PHP ^8.1 || ^8.2
Installation
Usage
1. Create your form request class by extending InertiaFormRequest
- Create a RequestForm class and extend it from InertiaFormRequest
-
Create a static method named formInputs and return an instance of InertiaForm
UserFormRequest.php
- Use
toInertia()
method to convert the form to an array and send it to the frontend. And usevalidated()
method to convert the form errors to an array and send it to the frontend.
2. Create your form object simply by using InertiaForm
You can simply create a form by using InertiaForm
class, and assign it into a variable, or return it from a method.
Issues
If you have any issues, please create an issue in the issues section.
Contributing
If you have any ideas or suggestions, please create a pull request in the pull requests section. I'll be happy to review and merge them.
Local development
- Clone the repository
- Run
composer install
- Run
composer test
to run the tests - Run
composer pint
to run the linter (syntax check) - Run
composer fix
to fix the linter errors - Run
composer analyse
to run phpstan analyse
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-inertia-form with dependencies
illuminate/support Version ^v10.20
inertiajs/inertia-laravel Version ^v0.6.9
spatie/laravel-data Version ^3.8