FIX: add deletable fields into in widgets and widget area models

This commit is contained in:
Michal Kváček
2016-09-25 00:21:18 +02:00
parent 00d7bd562c
commit 9802161af1
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -17,7 +17,9 @@ class Widget extends Model
'user_id', 'user_id',
'name', 'name',
'settings', 'settings',
'description' 'language',
'description',
'deletable'
]; ];
protected $guarded = []; protected $guarded = [];
@@ -31,7 +33,6 @@ class Widget extends Model
*/ */
public function createNew(WidgetType $widgetType, $data) public function createNew(WidgetType $widgetType, $data)
{ {
// convert array or whatever into object // convert array or whatever into object
if (!is_object($data)) { if (!is_object($data)) {
$data = (object)$data; $data = (object)$data;
+2 -1
View File
@@ -15,7 +15,8 @@ class WidgetArea extends Model
protected $fillable = [ protected $fillable = [
'name', 'name',
'code', 'code',
'description' 'description',
'deletable'
]; ];
protected $guarded = []; protected $guarded = [];