25 lines
450 B
PHP
25 lines
450 B
PHP
<?php
|
|
|
|
namespace App\Models\Product;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use App\Models\Product;
|
|
use App\Traits\{OrderServiceOptions,SiteID};
|
|
|
|
abstract class Type extends Model
|
|
{
|
|
use SiteID,OrderServiceOptions;
|
|
|
|
/* RELATIONS */
|
|
|
|
/**
|
|
* The product that sells this type
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
|
|
*/
|
|
public function product()
|
|
{
|
|
return $this->morphOne(Product::class, null,'model','model_id');
|
|
}
|
|
} |