static::STATUS_FALSE, 'message' => 'Something went wrong,' ]; try { $object = loggedInUser(); if (Hash::check($request['current_password'], $object->password)) { $object->password = Hash::make($request['new_password']); if ($object->save()) { $response['status'] = static::STATUS_TRUE; $response['message'] = trans('account_setting.validate.change_password.message_1'); } } else { $response['message'] = trans('account_setting.validate.change_password.message_2'); } } catch (\Exception $ex) { Log::error($ex); } return $response; } }