Download the PHP package fhusquinet/laravel-model-json-options without Composer
On this page you can find all versions of the php package fhusquinet/laravel-model-json-options. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fhusquinet/laravel-model-json-options
More information about fhusquinet/laravel-model-json-options
Files in fhusquinet/laravel-model-json-options
Package laravel-model-json-options
Short Description Store options as JSON values easily on your models.
License MIT
Homepage https://github.com/fhusquinet/laravel-model-json-options
Informations about the package laravel-model-json-options
Easily store options on your Eloquent models using JSON and a simple API.
If you are storing a lot of values, especially booleans, as columns in your database, and if this data is not always the same for each row you might want to consider using a JSON column. To ease up the usage of it, this package provides an easy way API toscope results from your database and getting/setting options. If you are used to Laravel's syntax you will be familiar with this one as well.
Installation
You can install the package via composer:
Usage
Add the HasOptions trait to your wanted models.
You should also include the options column to the model's table using a migration.
Testing
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
- Florian Husquinet
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-model-json-options with dependencies
illuminate/config Version ^8.0|^9.0
illuminate/database Version ^8.0|^9.0
illuminate/support Version ^8.0|^9.0