'array', 'notes' => 'array', 'date' => 'date', 'first_clock_in' => 'datetime:H:i:s', 'last_clock_out' => 'datetime:H:i:s', ]; public const TABLE_NAME = 'attendances'; protected $table = self::TABLE_NAME; public function employee(): HasOne { return $this->hasOne(Employee::class, 'id', 'employee_id') ->select('id', 'first_name', 'last_name', 'department_id', 'designation_id') ->with('department', 'designation'); } public function logs(): HasMany { return $this->hasMany(AttendanceLog::class, 'attendance_id'); } }