summaryrefslogtreecommitdiff
path: root/app/Models/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/User.php')
-rwxr-xr-xapp/Models/User.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Models/User.php b/app/Models/User.php
index e908679..3c5e429 100755
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -60,4 +60,19 @@ class User extends Authenticatable
public function links(){
return $this->hasMany(Link::class);
}
+
+ public function getStorageQuota(){
+ $roles = $this->roles();
+ $quota = 0;
+ foreach ($roles as $r){
+ if ($role->storage_quota > $quota){
+ $quota = $role->storage_quota;
+ }
+ }
+ return $quota;
+ }
+
+ public function getStorageUsed(){
+
+ }
}