mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 01:58:00 +08:00
Cleanup
This commit is contained in:
@@ -7,4 +7,9 @@
|
||||
@endforeach
|
||||
</ol>
|
||||
<x-filament::error :field="$model" />
|
||||
@if ($help)
|
||||
<x-filament::help>
|
||||
@markdown($help)
|
||||
</x-filament::help>
|
||||
@endif
|
||||
</div>
|
||||
@@ -4,9 +4,9 @@
|
||||
</legend>
|
||||
<div class="space-y-2">
|
||||
<x-filament::fields :fields="$fields" :class="$class" />
|
||||
@if ($info)
|
||||
@if ($help)
|
||||
<x-filament::help>
|
||||
@markdown($info)
|
||||
@markdown($help)
|
||||
</x-filament::help>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Support\Str;
|
||||
class BaseField {
|
||||
public $model;
|
||||
public $id;
|
||||
public $help;
|
||||
protected $enabled = true;
|
||||
protected $view;
|
||||
|
||||
@@ -33,6 +34,15 @@ class BaseField {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function help(string $help): self
|
||||
{
|
||||
$this->help = $help;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,6 @@ class Field extends BaseField {
|
||||
public $value;
|
||||
public $label;
|
||||
public $hint;
|
||||
public $help;
|
||||
public $extraAttributes = [];
|
||||
|
||||
/**
|
||||
@@ -48,15 +47,6 @@ class Field extends BaseField {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function help(string $help): self
|
||||
{
|
||||
$this->help = $help;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,6 @@ class Fieldset extends BaseField {
|
||||
public $legend;
|
||||
public $fields;
|
||||
public $class;
|
||||
public $info;
|
||||
|
||||
public function __construct($legend)
|
||||
{
|
||||
@@ -38,13 +37,4 @@ class Fieldset extends BaseField {
|
||||
$this->class = $class;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public function info(string $info): self
|
||||
{
|
||||
$this->info = $info;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user