更新 'src/Show/Field.php'
parent
361ff11542
commit
2ddbaff1b8
|
|
@ -56,6 +56,8 @@ class Field implements Renderable
|
|||
*/
|
||||
protected $escape = true;
|
||||
|
||||
protected $help;
|
||||
|
||||
/**
|
||||
* Field value.
|
||||
*
|
||||
|
|
@ -702,6 +704,7 @@ HTML;
|
|||
return [
|
||||
'content' => $this->value,
|
||||
'escape' => $this->escape,
|
||||
'help' => $this->help,
|
||||
'label' => $this->getLabel(),
|
||||
'wrapped' => $this->border,
|
||||
'width' => $this->width,
|
||||
|
|
@ -772,4 +775,11 @@ HTML;
|
|||
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