mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
29 lines
457 B
PHP
29 lines
457 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Course extends Model
|
|
{
|
|
public function bookings()
|
|
{
|
|
return $this->morphMany('App\Booking', 'bookable');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
|
|
public function event()
|
|
{
|
|
return $this->belongsTo('App\Event');
|
|
}
|
|
|
|
public function logs()
|
|
{
|
|
return $this->morphMany('App\Log', 'logable');
|
|
}
|
|
}
|