Changeset 0a1fb54 for app/Models/User.php
- Timestamp:
- 11/23/21 22:01:52 (3 years ago)
- Branches:
- master
- Children:
- dbc5976
- Parents:
- 4d73966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Models/User.php
r4d73966 r0a1fb54 134 134 } 135 135 136 public function getCreatedByUsername() 137 { 138 return User::where('id', $this->created_by)->pluck('username')->first(); 139 } 140 136 141 public function getCreatedByName() 137 142 { 138 return User::where('id', $this->created_by)->pluck('username')->first(); 143 $name = User::where('id', $this->created_by)->pluck('name')->first(); 144 $surname = User::where('id', $this->created_by)->pluck('surname')->first(); 145 146 return $name . " " . $surname; 139 147 } 140 148 … … 142 150 return $this->hasMany(Folder::class); 143 151 } 152 153 public function department() { 154 return $this->hasMany(Department::class); 155 } 144 156 }
Note:
See TracChangeset
for help on using the changeset viewer.