forked from miguel456/rbrecruiter
Recent changes
This commit is contained in:
12
app/TeamFile.php
Normal file → Executable file
12
app/TeamFile.php
Normal file → Executable file
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use App\Facades\DigitalStorageHelper;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Mpociot\Teamwork\Traits\UsedByTeams;
|
||||
@@ -16,7 +17,10 @@ class TeamFile extends Model
|
||||
'team_id',
|
||||
'name',
|
||||
'fs_location',
|
||||
'extension'
|
||||
'extension',
|
||||
'size',
|
||||
'caption',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function uploader()
|
||||
@@ -28,4 +32,10 @@ class TeamFile extends Model
|
||||
{
|
||||
return $this->belongsTo('App\Team');
|
||||
}
|
||||
|
||||
|
||||
public function getSizeAttribute($value)
|
||||
{
|
||||
return DigitalStorageHelper::setValue($value)->formatBytes(2, true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user