mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
New Model for Event,Booking and Course
This commit is contained in:
23
app/Course.php
Normal file
23
app/Course.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user