mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
April 9 update
This commit is contained in:
@@ -60,6 +60,23 @@ class Event extends Model
|
||||
return $events;
|
||||
}
|
||||
|
||||
public static function allThisYear()
|
||||
{
|
||||
$events = Event::all();
|
||||
foreach ($events as $key => $event)
|
||||
{
|
||||
if (date('c',strtotime($event->date_begin)) <= date('c',strtotime(\App\Config::getData('instruction_year_begin'))))
|
||||
{
|
||||
$events->forget($key);
|
||||
}
|
||||
if (date('c',strtotime($event->date_begin)) >= date('c',strtotime(\App\Config::getData('instruction_year_end'))))
|
||||
{
|
||||
$events->forget($key);
|
||||
}
|
||||
}
|
||||
return $events;
|
||||
}
|
||||
|
||||
public static function checkForError()
|
||||
{
|
||||
$events = Event::all();
|
||||
|
||||
Reference in New Issue
Block a user