containerClass . '">
' . $settings->code . '
';
return $code;
}
/**
* Display form for creating new instance of widget
*
* @param WidgetType $type
*
* @return mixed
*/
public static function renderAddForm(WidgetType $type)
{
return view('admin.widgets.htmlCode.new', [
'type' => $type,
'widget' => new Widget(),
'settings' => new \stdClass()
]);
}
/**
* Display form for editing already existing widget
*
* @param Widget $widget
*
* @return mixed
*/
public static function renderEditForm(Widget $widget)
{
$settings = json_decode($widget->settings);
return view('admin.widgets.htmlCode.edit', ['widget' => $widget, 'settings' => $settings]);
}
}