*/ protected $fillable = [ 'id_user', 'id_attendance', 'date', 'keterangan', 'url_bukti', 'status', ]; /** * The attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'date' => 'date', ]; } /** * Get the user that owns this pengajuan. */ public function user() { return $this->belongsTo(User::class, 'id_user'); } /** * Get the attendance associated with this pengajuan. */ public function attendance() { return $this->belongsTo(Attendance::class, 'id_attendance'); } }