private static function folderSize($dir)
    {
        $size = 0;
        foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
            $size += is_file($each) ? filesize($each) : self::folderSize($each);
        }
        return $size;
    }
private static function folderSize($dir)
    {
        $size = 0;
        foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
            $size += is_file($each) ? filesize($each) : self::folderSize($each);
        }
        return $size;
    }
private static function folderSize ( $ dir ) { $ size = 0 ; foreach ( glob ( rtrim ( $ dir , '/' ) . '/*' , GLOB_NOSORT ) as $ each ) { $ size += is_file ( $ each ) ? filesize ( $ each ) : self :: folderSize ( $ each ) ; } return $ size ; }
Get the laravel app's size

@param $dir
@return int
Get the laravel app s size