show = $show; } /** * 创建实例 * * @param Show $show * @return static */ public static function make(Show $show) { return new static($show); } /** * 添加字段 * * @param string $name * @param string $label * @return Field */ public function field(string $name, string $label): Field { return $this->show->field($name, $label); } /** * 添加分隔线 * * @param string $title * @return Show */ public function divider(string $title = ''): Show { return $this->show->divider($title); } /** * 添加行 * * @param callable $callback * @return Show */ public function row(callable $callback): Show { return $this->show->row($callback); } /** * 添加卡片 * * @param string $title * @param callable $callback * @return Show */ public function card(string $title, callable $callback): Show { return $this->show->card($title, $callback); } /** * 添加面板 * * @param string $title * @param callable $callback * @return Show */ public function panel(string $title, callable $callback): Show { return $this->show->panel($title, $callback); } /** * 添加工具 * * @param callable $callback * @return Show */ public function tools(callable $callback): Show { return $this->show->tools($callback); } /** * 添加关联 * * @param string $name * @param string $label * @param callable $callback * @return Show */ public function relation(string $name, string $label, callable $callback): Show { return $this->show->relation($name, $label, $callback); } }