Download the PHP package jrbarros/laravel-update-fillable without Composer
On this page you can find all versions of the php package jrbarros/laravel-update-fillable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jrbarros/laravel-update-fillable
More information about jrbarros/laravel-update-fillable
Files in jrbarros/laravel-update-fillable
Package laravel-update-fillable
Short Description This is my package laravel-update-fillable
License MIT
Homepage https://github.com/jrbarros/laravel-update-fillable
Informations about the package laravel-update-fillable
Laravel Update Fillable
Laravel Update Fillable is a command-line tool that updates the $fillable property of Eloquent models based on the current database schema.
Installation
Install the package via Composer:
Usage
To update the $fillable property of all Eloquent models in your project:
To update the $fillable property of a specific Eloquent model:
To update the $fillable property of all Eloquent models in a specific directory (e.g. app/Models):
To exclude certain columns from the $fillable property:
To write the changes to the model files:
To specify the path to your project:
Options
The following options are available:
--write
: Write changes to the model files (default: false)--exclude
: Comma-separated list of column names to exclude from the fillable property (default: "id")--path
: The path to the project (default: base_path())--directories
: Comma-separated list of directories where the models are located (default: "app") model: The name of a specific model to update (optional)
Customization
You can customize the behavior of the package by creating a nonFillable property in your model classes. This property should be an array of column names that should be excluded from the fillable property:
TODO
- [ ] Remove migration, model e config and use what you need to test us, creating less useless code
- [ ] Clean existing tests and create more
- [ ] Refactor any function and check compatibility with older versions of laravel
License
Laravel Update Fillable is open-sourced software licensed under the MIT license.
All versions of laravel-update-fillable with dependencies
doctrine/dbal Version ^3.6
illuminate/contracts Version ^10.0
spatie/laravel-package-tools Version ^1.14.0