18 lines
346 B
PHP
18 lines
346 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Lib\Helpers;
|
||
|
|
|
||
|
|
class FileHelper
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Get file path in private storage from stored path.
|
||
|
|
*
|
||
|
|
* @param string $basePath
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public static function getPrivateFilePath(string $basePath): string
|
||
|
|
{
|
||
|
|
return str($basePath)->replaceFirst('storage/app/private', '');
|
||
|
|
}
|
||
|
|
}
|