File tree 2 files changed +16
-1
lines changed
Components/ContentBuilder/Models
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Registrar {
13
13
/**
14
14
* the laravel backend version
15
15
*/
16
- const VERSION = '1.0.6 ' ;
16
+ const VERSION = '1.0.7 ' ;
17
17
const VERSION_NAME = 'Alpha ' ;
18
18
19
19
/**
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ class Content extends BaseModel {
47
47
'content_type_id ' => 'required|numeric ' ,
48
48
);
49
49
50
+ /**
51
+ * the custom fields of this content
52
+ *
53
+ * @var array
54
+ */
55
+ protected $ appends = ['custom_fields ' ];
56
+
50
57
/**
51
58
* @param $req
52
59
*/
@@ -79,6 +86,14 @@ public function getMiscDataAttribute()
79
86
return (Helpers::is_serialized ($ this ->attributes ['misc_data ' ])) ? unserialize ($ this ->attributes ['misc_data ' ]) : $ this ->attributes ['misc_data ' ];
80
87
}
81
88
89
+ /**
90
+ * @return array
91
+ */
92
+ public function getCustomFieldsAttribute ()
93
+ {
94
+ return self ::parseMetaData ($ this ->metaData ->toArray ());
95
+ }
96
+
82
97
/**
83
98
* parse meta data to associative array
84
99
*
You can’t perform that action at this time.
0 commit comments