'boolean', // notify_due_payments_time is stored as TIME in DB, no cast needed ]; /** * Get the user that owns the preferences. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the email to send notifications to. * Falls back to user's email if not set. */ public function getNotificationEmail(): string { return $this->notify_due_payments_email ?? $this->user->email; } }