$locale, 'dir' => $direction]; return Section::make(__("admin.languages.$locale"))->schema([ TextInput::make("name_$locale")->label(__('admin.catalog.name'))->required()->maxLength(120) ->extraInputAttributes($attributes), TextInput::make("slug_$locale")->label(__('admin.catalog.slug'))->required()->maxLength(120) ->rule($slugRule)->unique(ignoreRecord: true)->extraInputAttributes($attributes), Textarea::make("description_$locale")->label(__('admin.catalog.description'))->required()->maxLength(1200) ->extraInputAttributes($attributes)->columnSpanFull(), ])->columns(2)->columnSpanFull(); } public static function entries(): array { return array_map(fn (string $locale): Section => Section::make(__("admin.languages.$locale"))->schema([ TextEntry::make("name_$locale")->label(__('admin.catalog.name')), TextEntry::make("slug_$locale")->label(__('admin.catalog.slug')), TextEntry::make("description_$locale")->label(__('admin.catalog.description'))->columnSpanFull(), ])->columns(2)->columnSpanFull(), ['fa', 'en']); } }