Download the PHP package vishnu/fillable-generator without Composer
On this page you can find all versions of the php package vishnu/fillable-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vishnu/fillable-generator
More information about vishnu/fillable-generator
Files in vishnu/fillable-generator
Package fillable-generator
Short Description Laravel package to generate fillable arrays for Eloquent models
License MIT
Informations about the package fillable-generator
Fillable Generator
Fillable Generator is a Laravel package that simplifies the process of generating fillable arrays for Eloquent models based on migration files.
Installation
You can install the Fillable Generator package via Composer. Run the following command in your Laravel project directory:
Usage
Generating Fillable Arrays
To generate fillable arrays for your models, use the fillable:g
Artisan command provided by the Fillable Generator package.
Follow the on-screen prompts to enter the path to your migration file and the name of the corresponding model. The command will parse the migration file, extract the column names, and generate a fillable array for the specified model.
Example
Let's walk through an example of using the Fillable Generator package:
-
Suppose you have a migration file named
create_users_table.php
located in thedatabase/migrations
directory. -
Run the
fillable:g
command and enter the path to the migration file when prompted:Example prompt:
-
Next, enter the name of the corresponding model (e.g.,
User
): - The command will generate a fillable array for the
User
model based on the columns defined in the migration file and update the model file accordingly.
Support
If you encounter any issues or have questions about using the Fillable Generator package, please open an issue on GitHub.
License
The Fillable Generator package is open-source software licensed under the MIT license.