getProjects() as $data) { CmsProject::query()->updateOrCreate( ['slug' => $data['slug']], $data, ); } } /** * @return array> */ private function getProjects(): array { $key = 'b2in.themes.b2in.immobilien_projects.projects.'.self::PROJECT_SLUG; /** @var array $de */ $de = Lang::get($key, [], 'de'); /** @var array $en */ $en = Lang::get($key, [], 'en'); if ($de === [] || ! is_array($de)) { return []; } if (! is_array($en)) { $en = []; } $launchDate = isset($de['launch_date']) && is_string($de['launch_date']) ? Carbon::createFromFormat('d.m.Y', $de['launch_date']) : Carbon::create(2026, 3, 3); $extras = $this->projectTrustAndFurnitureBlocks(); return [ [ 'slug' => self::PROJECT_SLUG, 'title' => [ 'de' => (string) ($de['title'] ?? ''), 'en' => (string) ($en['title'] ?? $de['title'] ?? ''), ], 'location' => [ 'de' => (string) ($de['location'] ?? ''), 'en' => (string) ($en['location'] ?? $de['location'] ?? ''), ], 'status' => (string) ($de['status'] ?? 'NEW LAUNCH'), 'launch_date' => $launchDate, 'price_from_aed' => 1_125_000, 'currency' => 'AED', 'image' => (string) ($de['image'] ?? ''), 'highlights' => [ 'de' => is_array($de['highlights'] ?? null) ? $de['highlights'] : [], 'en' => is_array($en['highlights'] ?? null) ? $en['highlights'] : [], ], 'quick_facts' => is_array($de['quick_facts'] ?? null) ? $de['quick_facts'] : [], 'investment_case' => [ 'de' => is_array($de['investment_case'] ?? null) ? $de['investment_case'] : [], 'en' => is_array($en['investment_case'] ?? null) ? $en['investment_case'] : [], ], 'gallery' => is_array($de['gallery'] ?? null) ? $de['gallery'] : [], 'location_info' => [ 'de' => is_array($de['location_info'] ?? null) ? $de['location_info'] : [], 'en' => is_array($en['location_info'] ?? null) ? $en['location_info'] : [], ], 'contact' => [ 'de' => is_array($de['contact'] ?? null) ? $de['contact'] : [], 'en' => is_array($en['contact'] ?? null) ? $en['contact'] : [], ], 'investor_trust' => $extras['investor_trust'], 'furniture_benefit' => $extras['furniture_benefit'], 'is_published' => true, 'order' => 0, ], ]; } /** * @return array{investor_trust: array>, furniture_benefit: array>} */ private function projectTrustAndFurnitureBlocks(): array { return [ 'investor_trust' => [ 'de' => [ 'title' => 'Maximale Sicherheit für Ihr Investment', 'intro' => 'Der Kaufprozess in Dubai ist durch strenge staatliche Regularien international führend im Investorenschutz.', 'columns' => [ [ 'icon' => 'heroicon-o-lock-closed', 'title' => 'Staatliches Escrow-System', 'text' => 'Ihre Zahlungen fließen nicht an den Bauträger, sondern auf speziell regulierte Treuhandkonten der RERA (Real Estate Regulatory Agency).', ], [ 'icon' => 'heroicon-o-building-library', 'title' => 'Strenge DLD-Kontrolle', 'text' => 'Jeder Kaufvertrag (SPA) wird offiziell beim Dubai Land Department registriert. Lückenlose behördliche Überwachung jedes Bauprojekts.', ], [ 'icon' => 'heroicon-o-chart-bar', 'title' => 'Transparente Planbarkeit', 'text' => 'Gelder werden nur streng nach zertifiziertem Baufortschritt freigegeben. Eine Zweckentfremdung Ihres Kapitals ist gesetzlich ausgeschlossen.', ], ], 'cta_url' => '/magazin/1', 'cta_label' => 'Deep Dive: Erfahren Sie im Magazin im Detail, wie das Escrow-System in Dubai Sie als Käufer schützt', ], 'en' => [ 'title' => 'Maximum security for your investment', 'intro' => 'The purchase process in Dubai is among the world’s most investor-protective, thanks to strict government regulation.', 'columns' => [ [ 'icon' => 'heroicon-o-lock-closed', 'title' => 'Government Escrow system', 'text' => 'Your payments do not go to the developer; they are held in specially regulated trust accounts with the RERA (Real Estate Regulatory Agency).', ], [ 'icon' => 'heroicon-o-building-library', 'title' => 'Strict DLD oversight', 'text' => 'Every purchase contract (SPA) is officially registered with the Dubai Land Department. Every construction project is monitored end-to-end.', ], [ 'icon' => 'heroicon-o-chart-bar', 'title' => 'Transparent planning', 'text' => 'Funds are released only according to certified construction progress. Misuse of your capital is legally ruled out.', ], ], 'cta_url' => '/magazin/1', 'cta_label' => 'Deep dive: read in the magazine how Dubai’s Escrow system protects you as a buyer', ], ], 'furniture_benefit' => [ 'de' => [ 'title' => 'Ihr Investment, Ihr Vorteil', 'text' => 'Als Käufer einer B2in-Immobilie erhalten Sie exklusiven Insider-Zugang zu unserem B2in-Möbelnetzwerk. Richten Sie Ihre Immobilie zu unschlagbaren Partner-Konditionen ein.', 'button_text' => 'Mehr zum B2in-Netzwerk', 'button_link' => '/netzwerk', ], 'en' => [ 'title' => 'Your investment, your advantage', 'text' => 'As a buyer of a B2in property, you receive exclusive insider access to our B2in furniture network. Furnish your property at unbeatable partner conditions.', 'button_text' => 'Learn more about the B2in network', 'button_link' => '/netzwerk', ], ], ]; } }