belongsTo(User::class); } public function setPasswordAttribute($value) { $this->attributes['mysql_password_encrypted'] = Crypt::encryptString($value); } public function getPasswordAttribute() { return Crypt::decryptString($this->attributes['mysql_password_encrypted']); } }