Verbesserungen i80n, Bugfixes, uvm
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user