FIX: add deletable fields into in widgets and widget area models
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ class WidgetArea extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'name',
|
||||||
'code',
|
'code',
|
||||||
'description'
|
'description',
|
||||||
|
'deletable'
|
||||||
];
|
];
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user