芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/EmployeeDetails.php
'datetime', 'last_date' => 'datetime', 'date_of_birth' => 'datetime', 'calendar_view ' => 'array', ]; protected $with = ['designation', 'company', 'department']; protected $appends = ['upcoming_birthday']; const CUSTOM_FIELD_MODEL = 'App\Models\EmployeeDetails'; 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'); } }