Download the PHP package jgrossi/laravel-mutable without Composer
On this page you can find all versions of the php package jgrossi/laravel-mutable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jgrossi/laravel-mutable
More information about jgrossi/laravel-mutable
Files in jgrossi/laravel-mutable
Download jgrossi/laravel-mutable
More information about jgrossi/laravel-mutable
Files in jgrossi/laravel-mutable
Vendor jgrossi
Package laravel-mutable
Short Description Change model attributes values easily
License MIT
Homepage http://github.com/jgrossi/laravel-mutable
Package laravel-mutable
Short Description Change model attributes values easily
License MIT
Homepage http://github.com/jgrossi/laravel-mutable
Please rate this library. Is it a good library?
Informations about the package laravel-mutable
Laravel Mutable
Change Laravel models
toArray()
values using a simple and clean way
Installation
Usage
First add Mutable
trait to the model you want to change values:
Then create a UserMutator
class in any place in your app (or give it other name if you prefer). Then set the $mutator
property in your model:
In your mutator class you might have one method for each attribute you want to change:
Then when using $user->toArray()
you'll have the first_name
attributes changed.
Licence
MIT License © Junior Grossi
All versions of laravel-mutable with dependencies
PHP Build Version
Package Version
Requires
illuminate/database Version
~5.0
The package jgrossi/laravel-mutable contains the following files
Loading the files please wait ....