argument('userID'); $newPassword = $this->argument('newPassword'); try { $user = User::findOrFail($id); } catch (ModelNotFoundException $e) { $this->error('Invalid user ID ' . $id . '. Please see table `users` for correct IDs.'); exit(1); } // set new password $user->password = Hash::make($newPassword); $user->save(); $this->info('Password successfully changed.'); } }