Esempio n. 1
0
 /**
  * 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)
 {
     if (is_null($route->hostExpression())) {
         return true;
     }
     return preg_match($route->hostExpression(), $request->getHost());
 }