geschenkgutscheine implementiert ("Paket verschenken"). Neuer Upload-Provider: Sparkbooth.
This commit is contained in:
@@ -25,12 +25,16 @@ class Event extends Model
|
||||
'name' => 'array',
|
||||
'description' => 'array',
|
||||
'photobooth_enabled' => 'boolean',
|
||||
'photobooth_mode' => 'string',
|
||||
'photobooth_expires_at' => 'datetime',
|
||||
'photobooth_metadata' => 'array',
|
||||
'sparkbooth_expires_at' => 'datetime',
|
||||
'sparkbooth_last_upload_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'photobooth_password_encrypted',
|
||||
'sparkbooth_password_encrypted',
|
||||
];
|
||||
|
||||
protected static function booted(): void
|
||||
@@ -196,4 +200,26 @@ class Event extends Model
|
||||
? Crypt::encryptString($value)
|
||||
: null;
|
||||
}
|
||||
|
||||
public function getSparkboothPasswordAttribute(): ?string
|
||||
{
|
||||
$encrypted = $this->attributes['sparkbooth_password_encrypted'] ?? null;
|
||||
|
||||
if (! $encrypted) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return Crypt::decryptString($encrypted);
|
||||
} catch (DecryptException) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function setSparkboothPasswordAttribute(?string $value): void
|
||||
{
|
||||
$this->attributes['sparkbooth_password_encrypted'] = $value
|
||||
? Crypt::encryptString($value)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user