<?phpnamespace App\Livewire;use App\Filament\Resources\AnamneseResource;use App\Models\Anamnese;use Livewire\Component;use Filament\Forms\Concerns\InteractsWithForms;use Filament\Forms\Contracts\HasForms;use Filament\Forms\Form;class PublicAnamneseForm extends Component implements HasForms{ use InteractsWithForms; public ?array $data = []; public function mount(): void { $this->form->fill(); } public function form(Form $form): Form { return AnamneseResource::form($form); } public function create(): void { $data = $this->form->getState(); $anamnese = Anamnese::create($data); $this->form->fill(); session()->flash('success', 'Form submitted successfully!'); } public function render() { return view('livewire.public-anamnese-form'); }}
import defaultTheme from 'tailwindcss/defaultTheme';import preset from './vendor/filament/support/tailwind.config.preset'/** @type {import('tailwindcss').Config} */export default { presets: [preset], content: [ './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', './storage/framework/views/*.php', 'node_modules/preline/dist/*.js', './resources/**/*.blade.php', './resources/**/*.js', './resources/**/*.vue', ], theme: { extend: { fontFamily: { sans: ['InterVariable', ...defaultTheme.fontFamily.sans], }, }, }, plugins: [ 'preline/plugin', ],};