[增添]添加了datasource的setting数据库以及默认值

This commit is contained in:
makotocc0107
2024-08-27 10:13:21 +08:00
parent d111dfaea4
commit 72eb990970
10955 changed files with 978898 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Filament\Forms;
use Filament\Forms\Components\Component;
class Set
{
public function __construct(
protected Component $component,
) {
}
public function __invoke(string | Component $path, mixed $state, bool $isAbsolute = false): mixed
{
$livewire = $this->component->getLivewire();
data_set(
$livewire,
$this->component->generateRelativeStatePath($path, $isAbsolute),
$this->component->evaluate($state),
);
return $state;
}
}