Changeset c6b84df for app/Models
- Timestamp:
- 10/21/21 23:45:59 (3 years ago)
- Branches:
- develop, master
- Children:
- 4b7e2d3
- Parents:
- 6b95845
- Location:
- app/Models
- Files:
-
- 1 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
app/Models/Department.php
r6b95845 rc6b84df 25 25 } 26 26 27 public function document(){28 return $this->hasMany( Document::class);27 public function folder(){ 28 return $this->hasMany(Folder::class); 29 29 } 30 30 } -
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; -
app/Models/Folder.php
r6b95845 rc6b84df 6 6 use Illuminate\Database\Eloquent\Model; 7 7 8 class Documentextends Model8 class Folder extends Model 9 9 { 10 10 use HasFactory; 11 protected $table = " documents";11 protected $table = "folders"; 12 12 13 protected $fillable = ["arch_id", "name", "description", " user_id", "department_id", "is_important"];13 protected $fillable = ["arch_id", "name", "description", "location", "user_id", "department_id", "is_important"]; 14 14 15 15 -
app/Models/User.php
r6b95845 rc6b84df 24 24 "surname", 25 25 "username", 26 "phone_number", 27 "email", 26 28 "password", 27 "email",28 "phone_number",29 29 "avatar", 30 30 "role_id"
Note:
See TracChangeset
for help on using the changeset viewer.