argument('settings')); $settings_data = []; foreach ($settings as $s) { $s = explode(':', $s, 2); $settings_data[$s[0]] = $s[1]; } Endpoint::updateOrCreate( ['uri' => $this->argument('uri')], ['settings' => $settings_data] ); } }