use Filament\Pages\Page;class CareerApplyJob extends Page
Forms\Components\SpatieMediaLibraryFileUpload::make('personal_photo') ->preserveFilenames() ->label('Personal photo') ->collection('personal_photo') ->visibility('publico') ->disk(config('filesystems.default')) ->openable() ->previewable() ->acceptedFileTypes([ 'image/jpeg', 'image/png', ]) ->maxSize(2048) ->required()
dd($this->form->getState());
Section::make() ->schema([ Forms\Components\Repeater::make('academies') ->label('academies') ->relationship('academies') ->schema([ Forms\Components\TextInput::make('title') ->label('title') ->disabled(), Forms\Components\CheckboxList::make('roles') ->label('roles') ->options(function ($record) { return $record->roles->pluck('name', 'id')->toArray(); }) ->formatStateUsing(function ($record) use ($form) { $userRoleIds = $form->model->roles->pluck('id')->toArray(); $currentCheckBoxId = //ID return in_array($currentCheckBoxId,$userRoleIds); }) ]) ->addable(false) ->columns(1), ]) ->columnSpan([ 'sm' => 2, ]),