src/Scaffolder/Support/PathParser.php
public static function parse($path)
    {
        $path = explode(':', $path, 2);

        if (count($path) == 2)
        {
            if (head($path) == 'app')
            {
                $path = app_path(last($path));
            }
            elseif (head($path) == 'base')
            {
                $path = base_path(last($path));
            }
            elseif (head($path) == 'config')
            {
                $path = config_path(last($path));
            }
            elseif (head($path) == 'database')
            {
                $path = database_path(last($path));
            }
            elseif (head($path) == 'public')
            {
                $path = public_path(last($path));
            }
            elseif (head($path) == 'storage')
            {
                $path = storage_path(last($path));
            }
            else
            {
                $path = head($path);
            }
        }
        else
        {
            $path = head($path);
        }

        return $path;
    }
public static function parse($path)
    {
        $path = explode(':', $path, 2);

        if (count($path) == 2)
        {
            if (head($path) == 'app')
            {
                $path = app_path(last($path));
            }
            elseif (head($path) == 'base')
            {
                $path = base_path(last($path));
            }
            elseif (head($path) == 'config')
            {
                $path = config_path(last($path));
            }
            elseif (head($path) == 'database')
            {
                $path = database_path(last($path));
            }
            elseif (head($path) == 'public')
            {
                $path = public_path(last($path));
            }
            elseif (head($path) == 'storage')
            {
                $path = storage_path(last($path));
            }
            else
            {
                $path = head($path);
            }
        }
        else
        {
            $path = head($path);
        }

        return $path;
    }
public static function parse ( $ path ) { $ path = explode ( ':' , $ path , 2 ) ; if ( count ( $ path ) == 2 ) { if ( head ( $ path ) == 'app' ) { $ path = app_path ( last ( $ path ) ) ; } elseif ( head ( $ path ) == 'base' ) { $ path = base_path ( last ( $ path ) ) ; } elseif ( head ( $ path ) == 'config' ) { $ path = config_path ( last ( $ path ) ) ; } elseif ( head ( $ path ) == 'database' ) { $ path = database_path ( last ( $ path ) ) ; } elseif ( head ( $ path ) == 'public' ) { $ path = public_path ( last ( $ path ) ) ; } elseif ( head ( $ path ) == 'storage' ) { $ path = storage_path ( last ( $ path ) ) ; } else { $ path = head ( $ path ) ; } } else { $ path = head ( $ path ) ; } return $ path ; }
Parse a path.

@param $path

@return array|string
Parse a path .