argument('code'); $translation = $this->argument('translation'); // check if language does not exist $exist = Language::find($code); if ($exist) { $this->error('Language ' . $code . ' already exists!'); return; } Language::create(['code' => $code, 'name' => $translation]); $this->line('Successfully installed.'); } }