settingsService->getSetting([ 'type' => 'auth', 'sub_type' => 'google' ])['fields']; $recaptcha = $this->settingsService->getSetting([ 'type' => 'auth', 'sub_type' => 'recaptcha' ])['fields']; // Google Auth configuration config([ 'services.google.status' => $auth['active'], 'services.google.client_id' => $auth['client_id'], 'services.google.client_secret' => $auth['client_secret'], 'services.google.redirect' => $auth['redirect'], ]); // Recaptcha configuration config([ 'captcha.status' => $recaptcha['active'], 'captcha.secret' => $recaptcha['secret_key'], 'captcha.sitekey' => $recaptcha['site_key'], ]); return $next($request); } }