src/Charcoal/Admin/Support/BaseUrlTrait.php
public function baseUrl($targetPath = null)
    {
        if (!isset($this->baseUrl)) {
            throw new RuntimeException(sprintf(
                'The base URI is not defined for [%s]',
                get_class($this)
            ));
        }

        if ($targetPath !== null) {
            return $this->createAbsoluteUrl($this->baseUrl, $targetPath);
        }

        return rtrim($this->baseUrl, '/').'/';
    }
public function baseUrl($targetPath = null)
    {
        if (!isset($this->baseUrl)) {
            throw new RuntimeException(sprintf(
                'The base URI is not defined for [%s]',
                get_class($this)
            ));
        }

        if ($targetPath !== null) {
            return $this->createAbsoluteUrl($this->baseUrl, $targetPath);
        }

        return rtrim($this->baseUrl, '/').'/';
    }
public function baseUrl ( $ targetPath = null ) { if ( ! isset ( $ this -> baseUrl ) ) { throw new RuntimeException ( sprintf ( 'The base URI is not defined for [%s]' , get_class ( $ this ) ) ) ; } if ( $ targetPath !== null ) { return $ this -> createAbsoluteUrl ( $ this -> baseUrl , $ targetPath ) ; } return rtrim ( $ this -> baseUrl , '/' ) . '/' ; }
Retrieve the base URI of the application.

@param  mixed $targetPath Optional target path.
@throws RuntimeException If the base URI is missing.
@return string|null
Retrieve the base URI of the application .