Verbesserungen i80n, Bugfixes, uvm

This commit is contained in:
2026-03-28 14:04:01 +01:00
parent 7729aba416
commit e7adae9762
18 changed files with 202 additions and 65 deletions

View File

@@ -8,11 +8,22 @@ class ChaosEvents extends Model
{
protected $table = 'chaos_events';
protected function casts(): array
{
return [
'from_date_internal' => 'date',
'to_date_internal' => 'date',
'from_date_visible' => 'date',
'to_date_visible' => 'date',
];
}
public function preApplications() {
return $this->hasMany('App\Models\PreApplications', 'event_id');
}
public static function getActiveEvents(){
return self::where('to_date', '>=', now())->where('from_date', '<=', now())->get();
return self::where('to_date_internal', '>=', today())
->where('from_date_internal', '<=', today())->get();
}
}