Changeset c6b84df for app/Models/File.php
- Timestamp:
- 10/21/21 23:45:59 (3 years ago)
- Branches:
- develop, master
- Children:
- 4b7e2d3
- Parents:
- 6b95845
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Models/File.php
r6b95845 rc6b84df 11 11 protected $fillable = ["name", "location", "document_id"]; 12 12 13 public function document()13 public function folder() 14 14 { 15 return $this->belongsTo( Document::class);15 return $this->belongsTo(Folder::class); 16 16 } 17 17 18 18 public function getSize($location) 19 19 { 20 $fileSize = Storage::disk(' local')->size($location) / 1024 / 1024;20 $fileSize = Storage::disk('uploads')->size($location) / 1024 / 1024; 21 21 $fileSize = round($fileSize, 2); 22 22 return $fileSize;
Note:
See TracChangeset
for help on using the changeset viewer.