24 lines
506 B
PHP
24 lines
506 B
PHP
<?php
|
|
|
|
namespace Modules\MasterData\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
|
|
|
class MaterialGroupItem extends Pivot
|
|
{
|
|
protected $table = 'material_group_items';
|
|
|
|
public $incrementing = true;
|
|
|
|
public function group(): BelongsTo
|
|
{
|
|
return $this->belongsTo(MaterialGroup::class, 'material_group_id');
|
|
}
|
|
|
|
public function material(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Material::class);
|
|
}
|
|
}
|