rtablada / eloquent-show-me
There is no license information available for the latest version (dev-master) of this package.
Allows `shown` property on Eloquent Models
dev-master
2013-08-05 18:21 UTC
Requires
- php: >=5.3.0
- illuminate/database: 4.0.x
This package is not auto-updated.
Last update: 2024-12-03 06:58:04 UTC
README
In your composer.json
include rtablada/eloquent-show-me
. Then in your app/config/app.php
, you can change your Eloquent
alias to Rtablada\EloquentShowMe\Model
.
Use
Adding a $includeInToArray
array will tell Eloquent to always include those mutated attributes in any toArray
or toJson
calls.
Example
class Sprite extends \Rtablada\EloquentShowMe\Model { $includeInToArray = array( 'photoUrl' ); }