From 751ba687d71fe03aa571a931ee09ff8e587cce21 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 5 Jan 2015 23:00:41 +0000 Subject: [PATCH] Apply default attributes on Component. Closes #291 --- src/Models/Component.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Models/Component.php b/src/Models/Component.php index 2c2ba8ed..2af21afa 100644 --- a/src/Models/Component.php +++ b/src/Models/Component.php @@ -55,6 +55,16 @@ class Component extends Model implements TransformableInterface 'group_id', ]; + /** + * List of attributes that have default values. + * + * @var array + */ + protected $attributes = [ + 'order' => 0, + 'group_id' => 0, + ]; + /** * Components can belong to a group. *