'encrypted', 'recovery_codes' => 'encrypted:collection', 'confirmed_at' => 'datetime', ]; /** * Accessor for backward compatibility with code using secret_key. */ public function getSecretKeyAttribute(): ?string { return $this->secret; } /** * Mutator for backward compatibility with code using secret_key. * * Translates secret_key writes to the actual 'secret' column. */ public function setSecretKeyAttribute(?string $value): void { $this->secret = $value; } /** * Get the user this 2FA belongs to. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } }