© 2026 Hedgehog Software, LLC
<?php namespace App\Filament\Pages; use Filament\Pages\Page; use Filament\Resources\Form; use Filament\Forms\Components\Toggle; use Filament\Forms\Contracts\Hasforms; use Filament\Forms\Components\TextInput; use Filament\Forms\Concerns\InteractsWithForms; class CompanyMembers extends Page implements Hasforms { use InteractsWithForms; public ?array $data = []; protected static ?string $model = CompanyMembers::class; protected static ?string $navigationIcon = 'heroicon-o-user'; protected static ?string $modelLabel = '社員数ブレイクダウン'; protected static string $view = 'filament.pages.company-members'; public function mount(): void { $this->form->fill(); } public static function form(Form $form): Form { return $form ->schema([ TextInput::make('total')->placeholder('10人')->label('トータル'), TextInput::make('members-20s')->placeholder('2人')->label('20代'), TextInput::make('members-30s')->placeholder('0人')->label('30代'), TextInput::make('members-40s')->placeholder('4人')->label('40代'), TextInput::make('members-50s')->placeholder('3人')->label('50代'), TextInput::make('members-60s')->placeholder('1人')->label('60代'), Toggle::make('daiku')->label('専属大工(あり・なし)'), ]) ->statePath('data'); } }
<x-filament::page> <x-filament::form> {{ $this->form }} </x-filament::form> </x-filament::page>