Это скриншот результата ошибки и ее кода.
Ошибка Нить
Код: Выделить всё
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Section::make('Relationships')
->schema([
Forms\Components\Select::make('country_id')
->relationship(name: 'country', titleAttribute: 'name')
->searchable()
->preload()
->live()
->required(),
Forms\Components\Select::make('state_id')
->options(fn (Get $get): Collection => State::query()
->where('country_id', $get('country_id'))
->get()
->pluck('name', 'id'))
->searchable()
->preload()
->live()
->required(),
Forms\Components\Select::make('city_id')
->options(fn (Get $get): Collection => City::query()
->where('state_id', $get('state_id'))
->get()
->pluck('name', 'id'))
->searchable()
->preload()
->required(),
Подробнее здесь: https://stackoverflow.com/questions/786 ... collection