getHost(); if (strpos($domain_name, 'invoicing.co') !== false) { // config(['session.domain' => '.invoicing.co']); } else { config(['session.domain' => $domain_name]); } return $next($request); } }