Folder tree dynamic navigator

This commit is contained in:
Čarodej
2022-01-21 16:46:17 +01:00
parent 6cb2a1bb9a
commit e2cfdd5345
11 changed files with 68 additions and 1332 deletions

View File

@@ -121,19 +121,6 @@ class User extends Authenticatable implements MustVerifyEmail
->sum('filesize');
}
/**
* Get user full folder tree
*/
public function getFolderTreeAttribute(): Collection
{
return Folder::with(['folders.shared', 'shared:token,id,item_id,permission,is_protected,expire_in'])
->where('parent_id')
->where('team_folder', false)
->where('user_id', $this->id)
->sortable()
->get();
}
public function settings(): HasOne
{
return $this->hasOne(UserSetting::class);