mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Ajout Plan de cours vierge
This commit is contained in:
13
app/User.php
13
app/User.php
@@ -75,6 +75,19 @@ class User extends Authenticatable
|
||||
return $this->hasMany('App\Course');
|
||||
}
|
||||
|
||||
public function futureCourses()
|
||||
{
|
||||
$filterCourse = collect();
|
||||
foreach (\Auth::user()->courses as $course)
|
||||
{
|
||||
if(date('U',strtotime($course->event->date_begin)) >= date('U'))
|
||||
{
|
||||
$filterCourse->push($course);
|
||||
}
|
||||
}
|
||||
return $filterCourse;
|
||||
}
|
||||
|
||||
public function routeNotificationForNexmo($notification)
|
||||
{
|
||||
return $this->telephone;
|
||||
|
||||
Reference in New Issue
Block a user