backend update

This commit is contained in:
carodej
2020-06-09 18:06:04 +02:00
parent 0b7bc27a5f
commit 95bc310def
48 changed files with 1013 additions and 657 deletions
+8 -1
View File
@@ -100,7 +100,7 @@ class User extends Authenticatable
return [
'used' => (float) get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity),
'capacity' => $this->settings->storage_capacity,
'capacity_formatted' => Metric::gigabytes($this->settings->storage_capacity)->format(),
'capacity_formatted' => format_gigabytes($this->settings->storage_capacity),
];
}
@@ -118,6 +118,13 @@ class User extends Authenticatable
return $user_capacity;
}
public function getFolderTreeAttribute() {
return FileManagerFolder::with(['folders.shared', 'shared:token,id,item_id,permission,protected'])
->where('parent_id', 0)
->where('user_id', $this->id)
->get();
}
/**
* Format avatar to full url
*