Changeset 24a616f for app/Models/Department.php
- Timestamp:
- 10/13/21 15:44:57 (3 years ago)
- Branches:
- develop, master
- Children:
- 120759b
- Parents:
- 194a359
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Models/Department.php
r194a359 r24a616f 3 3 namespace App\Models; 4 4 5 use Illuminate\Database\Eloquent\Factories\HasFactory; 5 6 use Illuminate\Database\Eloquent\Model; 6 7 use Illuminate\Notifications\Notifiable; … … 9 10 { 10 11 use Notifiable; 12 use HasFactory; 11 13 12 14 protected $table = "departments"; 13 15 14 protected $fillable = ["name", "code", " user_id"];16 protected $fillable = ["name", "code", "location", "user_id"]; 15 17 16 18 protected $casts = [ … … 22 24 return User::where('id', $this->user_id)->pluck('username')->first(); 23 25 } 26 27 public function document(){ 28 return $this->hasMany(Document::class); 29 } 24 30 }
Note:
See TracChangeset
for help on using the changeset viewer.