Request::getHttpHost PHP Method

getHttpHost() public static method

The port name will be appended to the host if it's non-standard.
public static getHttpHost ( ) : string
return string
        public static function getHttpHost()
        {
            //Method inherited from \Symfony\Component\HttpFoundation\Request
            return \Illuminate\Http\Request::getHttpHost();
        }

Usage Example

Example #1
0
 public function dcp()
 {
     $domain = Domain::whereDomain(Request::getHttpHost())->first();
     //$domain = Domain::whereDomain(Request::server("SERVER_NAME"))->first();
     $cookie = Cookie::make('domain_hash', $domain->id);
     return Redirect::to('/')->withCookie($cookie);
 }
All Usage Examples Of Request::getHttpHost