argument('code'); $translation = $this->argument('translation'); $native = $this->argument('native'); $script = $this->argument('script'); // 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, 'native' => $native, 'script' => $script ? $script : 'Latn' ]); $this->line('Successfully installed.'); } }