芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/public_html/app/Models/EmployeeDetails.php
'array' ]; public function getUpcomingBirthdayAttribute() { if (is_null($this->date_of_birth)) { return null; } $dob = Carbon::parse(now($this->company->timezone)->year . '-' . $this->date_of_birth->month . '-' . $this->date_of_birth->day); if ($dob->isPast()) { $dob->addYear(); } return $dob->toDateString(); } public function user(): BelongsTo { return $this->belongsTo(User::class, 'user_id')->withoutGlobalScope(ActiveScope::class); } public function reportingTo(): BelongsTo { return $this->belongsTo(User::class, 'reporting_to')->withoutGlobalScope(ActiveScope::class); } public function designation(): BelongsTo { return $this->belongsTo(Designation::class, 'designation_id'); } public function department(): BelongsTo { return $this->belongsTo(Team::class, 'department_id'); } }