mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 18:59:09 -04:00
29 lines
437 B
PHP
29 lines
437 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Booking extends Model
|
|
{
|
|
public function bookable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
|
|
public function item()
|
|
{
|
|
return $this->belongsTo('App\Item');
|
|
}
|
|
|
|
public function logs()
|
|
{
|
|
return $this->morphMany('App\Log', 'logable');
|
|
}
|
|
}
|