<?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');
    }
}
