src/Http/Router/Route.php
public static function target($url, $target)
    {
        $route = new self($url);

        $route->setMethod('call');

        $segements = explode('@', $target);

        exception_if(count($segements) != 2, \LogicException::class, 'The method name in targeted route expect two names, the controller and method, '.count($segements).' given in '.$target);

        $controller = $segements[0];
        $method = $segements[1];

        $route->setResource($url, '', $controller, $method);

        return $route;
    }
public static function target($url, $target)
    {
        $route = new self($url);

        $route->setMethod('call');

        $segements = explode('@', $target);

        exception_if(count($segements) != 2, \LogicException::class, 'The method name in targeted route expect two names, the controller and method, '.count($segements).' given in '.$target);

        $controller = $segements[0];
        $method = $segements[1];

        $route->setResource($url, '', $controller, $method);

        return $route;
    }
public static function target ( $ url , $ target ) { $ route = new self ( $ url ) ; $ route -> setMethod ( 'call' ) ; $ segements = explode ( '@' , $ target ) ; exception_if ( count ( $ segements ) != 2 , \ LogicException :: class , 'The method name in targeted route expect two names, the controller and method, ' . count ( $ segements ) . ' given in ' . $ target ) ; $ controller = $ segements [ 0 ] ; $ method = $ segements [ 1 ] ; $ route -> setResource ( $ url , '' , $ controller , $ method ) ; return $ route ; }
Call target route.

@param string $url
@param string $target

@return Route
Call target route .