defaultHeader = $header; return $this; } public function defaultSubheader(string | Closure | null $subheader): static { $this->defaultSubheader = $subheader; return $this; } protected function setUp(): void { parent::setUp(); $this->collapsible(); $this->collapsed(); $this->schema([ Split::make([ Group::make([ FileUpload::make('logo') ->maxSize(1024) ->localizeLabel() ->openable() ->directory('logos/document') ->image() ->imageCropAspectRatio('3:2') ->panelAspectRatio('3:2') ->panelLayout('compact') ->extraAttributes([ 'class' => 'es-file-upload document-logo', ]) ->loadingIndicatorPosition('left') ->removeUploadedFileButtonPosition('right'), ]), Group::make([ TextInput::make('header') ->default(fn () => $this->getDefaultHeader()), TextInput::make('subheader') ->default(fn () => $this->getDefaultSubheader()), ])->grow(true), ])->from('md'), ]); } public function getDefaultHeader(): ?string { return $this->evaluate($this->defaultHeader); } public function getDefaultSubheader(): ?string { return $this->evaluate($this->defaultSubheader); } }