src/Routing/Router.php
public function version($version, $second, $third = null)
    {
        if (func_num_args() == 2) {
            list($version, $callback, $attributes) = array_merge(func_get_args(), [[]]);
        } else {
            list($version, $attributes, $callback) = func_get_args();
        }

        $attributes = array_merge($attributes, ['version' => $version]);

        $this->group($attributes, $callback);
    }
public function version($version, $second, $third = null)
    {
        if (func_num_args() == 2) {
            list($version, $callback, $attributes) = array_merge(func_get_args(), [[]]);
        } else {
            list($version, $attributes, $callback) = func_get_args();
        }

        $attributes = array_merge($attributes, ['version' => $version]);

        $this->group($attributes, $callback);
    }
public function version ( $ version , $ second , $ third = null ) { if ( func_num_args ( ) == 2 ) { list ( $ version , $ callback , $ attributes ) = array_merge ( func_get_args ( ) , [ [ ] ] ) ; } else { list ( $ version , $ attributes , $ callback ) = func_get_args ( ) ; } $ attributes = array_merge ( $ attributes , [ 'version' => $ version ] ) ; $ this -> group ( $ attributes , $ callback ) ; }
An alias for calling the group method, allows a more fluent API
for registering a new API version group with optional
attributes and a required callback.

This method can be called without the third parameter, however,
the callback should always be the last parameter.

@param array|string   $version
@param array|callable $second
@param callable       $third

@return void
An alias for calling the group method allows a more fluent API for registering a new API version group with optional attributes and a required callback .