public static function getRelativeFilepath($file)
    {
        $storageDir = self::convertSlashes(config('filer.path.absolute'));
        $absolutePath = self::convertSlashes($file->getRealPath());
        return dirname(str_replace($storageDir, '', $absolutePath));
    }
public static function getRelativeFilepath($file)
    {
        $storageDir = self::convertSlashes(config('filer.path.absolute'));
        $absolutePath = self::convertSlashes($file->getRealPath());
        return dirname(str_replace($storageDir, '', $absolutePath));
    }
public static function getRelativeFilepath ( $ file ) { $ storageDir = self :: convertSlashes ( config ( 'filer.path.absolute' ) ) ; $ absolutePath = self :: convertSlashes ( $ file -> getRealPath ( ) ) ; return dirname ( str_replace ( $ storageDir , '' , $ absolutePath ) ) ; }
Returns a file's relative path.

@param  mixed  $file
@return string
Returns a file s relative path .