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

31
app/TeamFile.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Mpociot\Teamwork\Traits\UsedByTeams;
class TeamFile extends Model
{
use HasFactory, UsedByTeams;
protected $fillable = [
'uploaded_by',
'team_id',
'name',
'fs_location',
'extension'
];
public function uploader()
{
return $this->belongsTo('App\User', 'uploaded_by', 'id');
}
public function team()
{
return $this->belongsTo('App\Team');
}
}