RSM-8 Add team files page and ability to download files

This commit is contained in:
2020-10-11 02:54:09 +01:00
parent b8a2a64354
commit 06d1e0ad3f
15 changed files with 511 additions and 17 deletions

View File

@@ -60,7 +60,8 @@ class User extends Authenticatable implements MustVerifyEmail
'email_verified_at' => 'datetime',
];
//
// RELATIONSHIPS
public function applications()
{
return $this->hasMany('App\Application', 'applicantUserID', 'id');
@@ -86,6 +87,13 @@ class User extends Authenticatable implements MustVerifyEmail
return $this->hasMany('App\Comment', 'authorID', 'id');
}
public function files()
{
return $this->hasMany('App\TeamFile', 'uploaded_by');
}
// UTILITY LOGIC
public function isBanned()
{
return ! $this->bans()->get()->isEmpty();