, origin_distance: array, origin_role: array}> */ private const ORIGINS = [ 'cabinet' => [ 'origin_city' => ['de' => 'Köln', 'en' => 'Cologne'], 'origin_distance' => ['de' => 'rund 200 km', 'en' => 'about 200 km'], 'origin_role' => [ 'de' => 'Gefertigt in der Kölner Manufaktur, beraten und geplant im CABINET Store Bielefeld.', 'en' => 'Made in the Cologne manufactory, advised and planned at the CABINET Store Bielefeld.', ], ], 'rotpunkt' => [ 'origin_city' => ['de' => 'Bünde', 'en' => 'Bünde'], 'origin_distance' => ['de' => 'rund 30 km', 'en' => 'about 30 km'], 'origin_role' => [ 'de' => 'Küchen aus eigener Fertigung in Bünde – geplant bei uns im Küchenstudio.', 'en' => 'Kitchens from their own production in Bünde – planned with us in the kitchen studio.', ], ], 'februe' => [ 'origin_city' => ['de' => 'Herford', 'en' => 'Herford'], 'origin_distance' => ['de' => 'rund 20 km', 'en' => 'about 20 km'], 'origin_role' => [ 'de' => 'Büro- und Objektmöbel aus eigener Fertigung in Herford.', 'en' => 'Office and contract furniture from their own production in Herford.', ], ], 'tischlerei' => [ 'origin_city' => ['de' => 'Rheda-Wiedenbrück', 'en' => 'Rheda-Wiedenbrück'], 'origin_distance' => ['de' => 'rund 35 km', 'en' => 'about 35 km'], 'origin_role' => [ 'de' => 'Tischlerei und Innenausbau aus Rheda-Wiedenbrück – vom einzelnen Möbel bis zum ganzen Raum, inklusive Montage.', 'en' => 'Joinery and interior fit-out from Rheda-Wiedenbrück – from a single piece to the whole room, installation included.', ], ], ]; public function run(): void { $set = 0; $kept = 0; foreach (self::ORIGINS as $slug => $origin) { $brand = CmsBrand::query()->where('slug', $slug)->first(); if (! $brand) { $this->command?->warn("Marke „{$slug}“ nicht gefunden – übersprungen."); continue; } if (trim((string) $brand->getTranslation('origin_city', 'de', false)) !== '') { $kept++; continue; } $brand->fill($origin); $brand->save(); $set++; } $this->command?->info("Fertigungsorte gesetzt: {$set}, vorhandene behalten: {$kept}."); } }