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

This commit is contained in:
makotocc0107
2024-08-27 09:57:44 +08:00
parent d111dfaea4
commit 72eb990970
10955 changed files with 978898 additions and 0 deletions

43
vendor/filament/forms/stubs/Form.stub vendored Normal file
View File

@@ -0,0 +1,43 @@
<?php
namespace {{ namespace }};
use Filament\Forms;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Form;
use Livewire\Component;
use Illuminate\Contracts\View\View;
class {{ class }} extends Component implements HasForms
{
use InteractsWithForms;
public ?array $data = [];
public function mount()
{
$this->form->fill();
}
public function form(Form $form): Form
{
return $form
->schema([
//
])
->statePath('data');
}
public function submit(): void
{
$data = $this->form->getState();
//
}
public function render(): View
{
return view('{{ view }}');
}
}