added a help system, replaced the words "tenant" and "Pwa" with better alternatives. corrected and implemented cron jobs. prepared going live on a coolify-powered system.

This commit is contained in:
Codex Agent
2025-11-10 16:23:09 +01:00
parent ba9e64dfcb
commit 447a90a742
123 changed files with 6398 additions and 153 deletions

View File

@@ -3,11 +3,13 @@
namespace App\Models;
use App\Services\EventJoinTokenService;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Facades\Crypt;
class Event extends Model
{
@@ -22,6 +24,13 @@ class Event extends Model
'is_active' => 'boolean',
'name' => 'array',
'description' => 'array',
'photobooth_enabled' => 'boolean',
'photobooth_expires_at' => 'datetime',
'photobooth_metadata' => 'array',
];
protected $hidden = [
'photobooth_password_encrypted',
];
protected static function booted(): void
@@ -159,4 +168,26 @@ class Event extends Model
$this->attributes['settings'] = json_encode($value ?? []);
}
public function getPhotoboothPasswordAttribute(): ?string
{
$encrypted = $this->attributes['photobooth_password_encrypted'] ?? null;
if (! $encrypted) {
return null;
}
try {
return Crypt::decryptString($encrypted);
} catch (DecryptException) {
return null;
}
}
public function setPhotoboothPasswordAttribute(?string $value): void
{
$this->attributes['photobooth_password_encrypted'] = $value
? Crypt::encryptString($value)
: null;
}
}