mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
32 lines
666 B
PHP
32 lines
666 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
|
|
|
class Transport extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'transport_arrangements';
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
|
*/
|
|
public function owner(): morphTo
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
/**
|
|
* @return MorphMany
|
|
*/
|
|
public function schedules(): morphMany
|
|
{
|
|
return $this->morphMany(Schedule::class, 'owner');
|
|
}
|
|
}
|