Chaos-Events und Voranmeldungen
This commit is contained in:
18
app/Models/ChaosEvents.php
Normal file
18
app/Models/ChaosEvents.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ChaosEvents extends Model
|
||||
{
|
||||
protected $table = 'chaos_events';
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user