*/ private const DEPARTMENTS = [ 'production' => [ 'name' => 'Production', 'code' => 'PROD', 'description' => 'Manufacturing and production operations.', ], 'warehouse' => [ 'name' => 'Warehouse', 'code' => 'WH', 'description' => 'Inventory and logistics.', ], 'administration' => [ 'name' => 'Administration', 'code' => 'ADM', 'description' => 'General administration and office management.', ], 'hr' => [ 'name' => 'HR', 'code' => 'HR', 'description' => 'Human resources and personnel management.', ], 'accounting' => [ 'name' => 'Accounting', 'code' => 'ACC', 'description' => 'Finance and accounting.', ], ]; public function run(): void { foreach (self::DEPARTMENTS as $department) { Department::query()->updateOrCreate( ['code' => $department['code']], [ 'name' => $department['name'], 'description' => $department['description'], 'is_active' => true, ], ); } } }