table('user_group')->pluck('title', 'user_group_id'); } public function handle() { $wpRoles = $this->getWpRoles(); $roleMap = []; foreach ($wpRoles as $role) { $roleMap[$role] = (int) $this->ask("XenForo group ID linked to role {$role}"); } DB::table('migration_settings') ->updateOrInsert([ 'key' => 'wp_role_to_xf_group' ], [ 'value' => json_encode($roleMap), 'updated_at' => now() ]); $oldXfGroups = $this->getOldXfGroups(); $groupMap = []; foreach ($oldXfGroups as $id => $title) { $groupMap[$id] = (int) $this->ask("Xenforo group ID linked to old XF group {$title}|{$id}"); } DB::table('migration_settings') ->updateOrInsert([ 'key' => 'old_xf_group_to_xf_group' ],[ 'value' => json_encode($groupMap), 'updated_at' => now() ]); $this->info('XF groups updated.'); } }