mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
create folder in upload request
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
use Carbon\Carbon;
|
||||
use ByteUnits\Metric;
|
||||
use App\Users\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Domain\Files\Models\File;
|
||||
use Domain\Sharing\Models\Share;
|
||||
@@ -27,6 +28,22 @@ if (! function_exists('isRunningCron')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('getInnerFolderIds')) {
|
||||
/**
|
||||
* Get all folder children ids
|
||||
*/
|
||||
function getChildrenFolderIds(string $id): array
|
||||
{
|
||||
// Get folders within upload request
|
||||
$folderWithinIds = Folder::with('folders:id,parent_id')
|
||||
->where('parent_id', $id)
|
||||
->get(['id']);
|
||||
|
||||
// Then get all accessible folders within
|
||||
return Arr::flatten([filter_folders_ids($folderWithinIds), $id]);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('obfuscate_email')) {
|
||||
/**
|
||||
* Obfuscate email
|
||||
|
||||
Reference in New Issue
Block a user