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

This package is not auto-updated.

Last update: 2024-04-23 03:32:49 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'
	);
}