31 lines
511 B
PHP
31 lines
511 B
PHP
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use App\Traits\HasComments;
|
|
|
|
class Variation extends Model
|
|
{
|
|
use HasComments;
|
|
|
|
protected $guarded = ['id'];
|
|
protected $table = 'shop_variations';
|
|
|
|
public function package()
|
|
{
|
|
return $this->belongsTo(Package::class);
|
|
}
|
|
|
|
public function unity()
|
|
{
|
|
return $this->belongsTo(Unity::class);
|
|
}
|
|
|
|
public function offers()
|
|
{
|
|
return $this->hasMany(Offer::class);
|
|
}
|
|
}
|