43 lines
767 B
Plaintext
43 lines
767 B
Plaintext
<?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 }}');
|
|
}
|
|
} |