'encrypted', ]; /** * Get the user that owns the database. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the decrypted database password. */ public function getDecryptedPasswordAttribute(): string { return decrypt($this->db_password); } /** * Set the encrypted database password. */ public function setPasswordAttribute(string $password): void { $this->attributes['db_password'] = encrypt($password); } }