src/Routing/Router.php
public function prefix($prefix = '', $namespace = '')
    {
        $namespace === '' && $namespace = (string) $this->namespace;

        $prefix && $prefix[0] !== '/' && $prefix = '/' . $prefix;

        $namespace = str_replace('\\\\', '\\', $namespace . '\\');

        $this->prefix = (string) $prefix;

        $this->namespace = ltrim($namespace, '\\');

        return $this;
    }
public function prefix($prefix = '', $namespace = '')
    {
        $namespace === '' && $namespace = (string) $this->namespace;

        $prefix && $prefix[0] !== '/' && $prefix = '/' . $prefix;

        $namespace = str_replace('\\\\', '\\', $namespace . '\\');

        $this->prefix = (string) $prefix;

        $this->namespace = ltrim($namespace, '\\');

        return $this;
    }
public function prefix ( $ prefix = '' , $ namespace = '' ) { $ namespace === '' && $ namespace = ( string ) $ this -> namespace ; $ prefix && $ prefix [ 0 ] !== '/' && $ prefix = '/' . $ prefix ; $ namespace = str_replace ( '\\\\' , '\\' , $ namespace . '\\' ) ; $ this -> prefix = ( string ) $ prefix ; $ this -> namespace = ltrim ( $ namespace , '\\' ) ; return $ this ; }
Sets a prefix for the succeeding route endpoints.

@param  string $prefix
@param  string $namespace
@return self
Sets a prefix for the succeeding route endpoints .