Your IP : 52.14.125.137


Current Path : /home/lentoinv/props/vendor/laravel/framework/src/Illuminate/Routing/Matching/
Upload File :
Current File : /home/lentoinv/props/vendor/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php

<?php

namespace Illuminate\Routing\Matching;

use Illuminate\Http\Request;
use Illuminate\Routing\Route;

class HostValidator implements ValidatorInterface
{
    /**
     * Validate a given rule against a route and request.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @param  \Illuminate\Http\Request  $request
     * @return bool
     */
    public function matches(Route $route, Request $request)
    {
        $hostRegex = $route->getCompiled()->getHostRegex();

        if (is_null($hostRegex)) {
            return true;
        }

        return preg_match($hostRegex, $request->getHost());
    }
}

?>