protected function getFullPath(string $template): string
    {
        // If the first character of the template is an @ symbol
        // Then this is a template from a path in the config
        if (strpos($template, '@') === 0) {
            $explodeOn = Directory::DIRECTORY_SEPARATOR;
            $parts     = explode($explodeOn, $template);
            $path      = config('views.paths.' . $parts[0]);

            // If there is no path
            if ($path === null) {
                // Then throw an exception
                throw new InvalidConfigPath(
                    'Invalid path '
                    . $parts[0]
                    . ' specified for template '
                    . $template
                );
            }

            // Remove any trailing slashes
            $parts[0] = $explodeOn . trim($path, $explodeOn);

            $path = implode($explodeOn, $parts);
        } else {
            $path = $this->getTemplateDir($template);
        }

        return $path . $this->getFileExtension();
    }
protected function getFullPath(string $template): string
    {
        // If the first character of the template is an @ symbol
        // Then this is a template from a path in the config
        if (strpos($template, '@') === 0) {
            $explodeOn = Directory::DIRECTORY_SEPARATOR;
            $parts     = explode($explodeOn, $template);
            $path      = config('views.paths.' . $parts[0]);

            // If there is no path
            if ($path === null) {
                // Then throw an exception
                throw new InvalidConfigPath(
                    'Invalid path '
                    . $parts[0]
                    . ' specified for template '
                    . $template
                );
            }

            // Remove any trailing slashes
            $parts[0] = $explodeOn . trim($path, $explodeOn);

            $path = implode($explodeOn, $parts);
        } else {
            $path = $this->getTemplateDir($template);
        }

        return $path . $this->getFileExtension();
    }
protected function getFullPath ( string $ template ) : string { // If the first character of the template is an @ symbol // Then this is a template from a path in the config if ( strpos ( $ template , '@' ) === 0 ) { $ explodeOn = Directory :: DIRECTORY_SEPARATOR ; $ parts = explode ( $ explodeOn , $ template ) ; $ path = config ( 'views.paths.' . $ parts [ 0 ] ) ; // If there is no path if ( $ path === null ) { // Then throw an exception throw new InvalidConfigPath ( 'Invalid path ' . $ parts [ 0 ] . ' specified for template ' . $ template ) ; } // Remove any trailing slashes $ parts [ 0 ] = $ explodeOn . trim ( $ path , $ explodeOn ) ; $ path = implode ( $ explodeOn , $ parts ) ; } else { $ path = $ this -> getTemplateDir ( $ template ) ; } return $ path . $ this -> getFileExtension ( ) ; }
Get the full path for a given template.

@param string $template The template

@throws InvalidConfigPath

@return string
Get the full path for a given template .