first_name . ' ' . $this->middle_name . ' ' . $this->last_name; return $this->first_name . ' ' . $this->last_name; } protected function getProfilePicAttribute() { return $this->profile_picture ? asset('storage/' . $this->profile_picture) : asset('assets/images/task.png'); } public function user() { return $this->belongsTo(User::class, 'users_id'); } public function department() { return $this->belongsTo(Department::class, 'department_id')->withDefault(); } public function designation() { return $this->HasOne(Designation::class, 'designation_id')->withDefault(); } }