'required|integer|exists:accounts,id', ]; } /** * Archive all the contacts in the account. * * This method is used by a user who wants to downgrade his plan. * * @param array $data * @return bool */ public function execute(array $data): bool { $this->validate($data); try { DB::table('contacts') ->where('account_id', $data['account_id']) ->update(['is_active' => 0]); } catch (QueryException $e) { return false; } return true; } }