Download the PHP package tobymaxham/laravel-properties without Composer
On this page you can find all versions of the php package tobymaxham/laravel-properties. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tobymaxham/laravel-properties
More information about tobymaxham/laravel-properties
Files in tobymaxham/laravel-properties
Package laravel-properties
Short Description This package can be used to add some functionality to your Eloquent Models using properties
License MIT
Homepage https://github.com/TobyMaxham/laravel-properties
Informations about the package laravel-properties
TobyMaxham Laravel Properties
This package can be used to add some functionality to your Eloquent Models using properties.
Installation
You can install the package via composer:
Usage
Your Eloquent Models should use the TobyMaxham\LaravelProperties\Traits\UseProperties
trait.
The trait contains a few methods to help you handle JSON-Date in your Database Table Column.
Your models' migrations should have a field called properties
to save the JSON-Data.
Here's an example of how to implement the trait:
With its migration:
Use to store values in your Model
You can also use Laravel's "dot" notation to set a value:
Receive a value from your Model
You can also pass a default value:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Support me
Credits
- TobyMaxham
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-properties with dependencies
illuminate/database Version ^8.0|^9.0|^10.0
illuminate/support Version ^8.0|^9.0|^10.0