Download the PHP package vonsogt/laravel-form-template without Composer
On this page you can find all versions of the php package vonsogt/laravel-form-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vonsogt/laravel-form-template
More information about vonsogt/laravel-form-template
Files in vonsogt/laravel-form-template
Package laravel-form-template
Short Description Save form templates to re-use them later
License MIT
Homepage https://github.com/soufiene-slimi/laravel-form-template
Informations about the package laravel-form-template
Laravel Form Template
This laravel package allow you to save some form templates to apply them whenever you want. the utility is to avoid filling some inputs again and again, that most of the time have the same values, or maybe to apply some template based on the user choice.
Installation
You can install the package via composer:
Then run:
Usage
First of all you don't need to import anything since the package provide an alias.
Creating a new template
Note that you can configure the attributes that will be removed from a model during the template creation by publishing the configuration and updating the excluded key.
Applying a template
To apply a template, first you have to use the old() function in your input:
Then find the template and apply it
Template is an instance of the Illuminate\Database\Eloquent\Model, this mean that you can use all the Laravel ORM features.
To publish the configuration file run:
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Soufiene Slimi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.