title($title); $this->content($content); $this->icon($icon); } /** * Info Box 图标 * * @param string $icon * @return $this */ public function icon(string $icon = null) { $this->icon = $icon; return $this; } /** * Info Box 内容 * * @param string $content * @return $this */ public function content($content) { $this->content = $content; return $this; } /** * Info Box 标题 * * @param string $title * @return $this */ public function title($title) { $this->title = $title; return $this; } /** * Add style. * * @param string $style * @return $this */ public function style($style = 'info') { $this->style = $style; return $this; } /** * Variables in view. * * @return array */ public function defaultVariables() { $this->class('info-box'); return [ 'title' => $this->title, 'content' => $this->content, 'icon' => $this->icon, 'style' => $this->style, 'attributes' => $this->formatHtmlAttributes(), ]; } }