Route::match PHP Method

match() public static method

Register a new route with the given verbs.
public static match ( array | string $methods, string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$methods array | string
$uri string
$action Closure | array | string | null
return Illuminate\Routing\Route
        public static function match($methods, $uri, $action = null)
        {
            return \Illuminate\Routing\Router::match($methods, $uri, $action);
        }

Usage Example

Exemplo n.º 1
0
 public function testMorePath()
 {
     $route = new Route("/users/login");
     $url = parse_url("http://example.com/users/login?foo=bar");
     $this->assertInternalType("array", $route->match($url["path"], "GET", $url["host"], $url["scheme"]));
     $url = parse_url("http://example.com/users/login.php");
     $this->assertFalse($route->match($url["path"], "GET", $url["host"], $url["scheme"]));
 }
All Usage Examples Of Route::match