|
@@ -27,6 +27,11 @@ trait HasAssets
|
|
|
*/
|
|
|
protected static $js = [];
|
|
|
|
|
|
+ /**
|
|
|
+ * @var array
|
|
|
+ */
|
|
|
+ protected static $html = [];
|
|
|
+
|
|
|
/**
|
|
|
* @var array
|
|
|
*/
|
|
@@ -262,6 +267,22 @@ trait HasAssets
|
|
|
return $js;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param string $html
|
|
|
+ *
|
|
|
+ * @return null|string
|
|
|
+ */
|
|
|
+ public static function html($html = '')
|
|
|
+ {
|
|
|
+ if (!empty($html)) {
|
|
|
+ static::$html = array_merge(static::$html, (array) $html);
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ return implode('', array_unique(static::$html));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Add js or get all js.
|
|
|
*
|