更新 'src/Show/Field.php'
parent
361ff11542
commit
2ddbaff1b8
|
|
@ -56,6 +56,8 @@ class Field implements Renderable
|
||||||
*/
|
*/
|
||||||
protected $escape = true;
|
protected $escape = true;
|
||||||
|
|
||||||
|
protected $help;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Field value.
|
* Field value.
|
||||||
*
|
*
|
||||||
|
|
@ -702,6 +704,7 @@ HTML;
|
||||||
return [
|
return [
|
||||||
'content' => $this->value,
|
'content' => $this->value,
|
||||||
'escape' => $this->escape,
|
'escape' => $this->escape,
|
||||||
|
'help' => $this->help,
|
||||||
'label' => $this->getLabel(),
|
'label' => $this->getLabel(),
|
||||||
'wrapped' => $this->border,
|
'wrapped' => $this->border,
|
||||||
'width' => $this->width,
|
'width' => $this->width,
|
||||||
|
|
@ -772,4 +775,11 @@ HTML;
|
||||||
return format_byte($value, $dec);
|
return format_byte($value, $dec);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function help($text = '', $icon = 'feather icon-help-circle')
|
||||||
|
{
|
||||||
|
$this->help = compact('text', 'icon');
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue