mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Debut BD Cours
This commit is contained in:
@@ -16,6 +16,18 @@ class Course extends Model
|
||||
return $this->belongsTo('App\User');
|
||||
}
|
||||
|
||||
public function instructor()
|
||||
{
|
||||
if (\App\User::find($this->user_id))
|
||||
{
|
||||
return \App\User::find($this->user_id)->fullname();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->user_id;
|
||||
}
|
||||
}
|
||||
|
||||
public function event()
|
||||
{
|
||||
return $this->belongsTo('App\Event');
|
||||
|
||||
Reference in New Issue
Block a user