© 2026 Hedgehog Software, LLC
Company::find($get('company_id'))
Forms\Components\Repeater::make('excursionsCompanies') ->label(__('excursion.excursionsCompanies')) ->addActionLabel(__('excursion.add_company')) ->relationship() ->itemLabel(fn (array $state): ?string => Company::find($state['company_id'])?->name) ->orderColumn('sort') ->schema([ Forms\Components\Select::make('company_id') ->label(__('company.singular')) ->live() ->searchable() ->relationship('company', 'name') ->required(), Forms\Components\Placeholder::make('company_address') ->label(__('company.address')) ->hidden(fn (Get $get) => ! $get('company_id')) ->content(fn (Get $get) => Company::find($get('company_id'))?->fullAddress), ];
->content(fn (Get $get) => static::getCompany($get('id'))
static function getCompany(int|string $id) { return once(fn () => Company::find($get('company_id'))?->fullAddress)); }