| @@ 99-112 (lines=14) @@ | ||
| 96 | * |
|
| 97 | * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
| 98 | */ |
|
| 99 | public static function css($css = null) |
|
| 100 | { |
|
| 101 | if (!is_null($css)) { |
|
| 102 | return self::$css = array_merge(self::$css, (array) $css); |
|
| 103 | } |
|
| 104 | ||
| 105 | if (!$css = static::getMinifiedCss()) { |
|
| 106 | $css = array_merge(static::$css, static::baseCss()); |
|
| 107 | } |
|
| 108 | ||
| 109 | $css = array_filter(array_unique($css)); |
|
| 110 | ||
| 111 | return view('admin::partials.css', compact('css')); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * @param null $css |
|
| @@ 139-152 (lines=14) @@ | ||
| 136 | * |
|
| 137 | * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
| 138 | */ |
|
| 139 | public static function js($js = null) |
|
| 140 | { |
|
| 141 | if (!is_null($js)) { |
|
| 142 | return self::$js = array_merge(self::$js, (array) $js); |
|
| 143 | } |
|
| 144 | ||
| 145 | if (!$js = static::getMinifiedJs()) { |
|
| 146 | $js = array_merge(static::baseJs(), static::$js); |
|
| 147 | } |
|
| 148 | ||
| 149 | $js = array_filter(array_unique($js)); |
|
| 150 | ||
| 151 | return view('admin::partials.js', compact('js')); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * Add js or get all js. |
|