Download the PHP package mennovanhout/laravel-model-constants without Composer
On this page you can find all versions of the php package mennovanhout/laravel-model-constants. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mennovanhout/laravel-model-constants
More information about mennovanhout/laravel-model-constants
Files in mennovanhout/laravel-model-constants
Download mennovanhout/laravel-model-constants
More information about mennovanhout/laravel-model-constants
Files in mennovanhout/laravel-model-constants
Vendor mennovanhout
Package laravel-model-constants
Short Description This package creates constants for column names, this can then be used instead of strings to reduce typo's errors and improve coding with your IDE
License MIT
Package laravel-model-constants
Short Description This package creates constants for column names, this can then be used instead of strings to reduce typo's errors and improve coding with your IDE
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-model-constants
Laravel Model Constants
This package will generate constant files for your models to reduce typo's and the need of debugging to find out what attributes are available.
Benefits
- This package is ready to be installed and to forget about, no maintenance or commands you have to learn.
- This packages listens to the Laravel migrations ended event (Files automatically get updated/generated).
- When a column is removed you will get IDE errors.
- Fewer typo's.
- These constants are widely available throughout your whole codebase instead of having to type string.
- This package is created with all design patterns in mind. Whether you use domain driven design or Laravels default approach.
How to install it
composer require mennovanhout/laravel-model-constants
How to use it
This packages hooks into Laravels migration system and will generate the files after each migration or batch of migrations.
You can run it manually with: artisan model:constants
.
If you want to remove files generated by this packages you can do that with: artisan model:constants-clean
.
Example: Generated constant file
Example Model
Todo:
- Add config file.
- Be able to put the generated constant files in another directory.
- Add an option to also generated relations in the constants.
- Add an option to also generated custom attributes in the constants.
All versions of laravel-model-constants with dependencies
PHP Build Version
Package Version
The package mennovanhout/laravel-model-constants contains the following files
Loading the files please wait ....