# Employee
app / Models / Employee.php
public function departmentInfo(){
return $this->belongsTo(Department::class, 'department_id');
}
public function profileImagePath(){
if ($this->profile_image){
return asset("storage/employee/profile_images/".$this->profile_image);
}
return asset('user.png');
}
public function salariesInfo(){
return $this->hasMany(Salary::class, "user_id", "id");
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
← TaskRequest Project →