D
Size: a a a
D
P
ЭБ
public function products()
{
$model = '';
switch ($this->product_type_id)
{
case 1:
$model = 'App\Models\RollProduct';
break;
case 2:
$model = 'App\Models\ZebraProduct';
break;
case 3:
$model = 'App\Models\VertProduct';
break;
case 4:
$model = 'App\Models\GorizProduct';
break;
}
return $this->hasMany($model);
}
A
public function products()
{
$model = '';
switch ($this->product_type_id)
{
case 1:
$model = 'App\Models\RollProduct';
break;
case 2:
$model = 'App\Models\ZebraProduct';
break;
case 3:
$model = 'App\Models\VertProduct';
break;
case 4:
$model = 'App\Models\GorizProduct';
break;
}
return $this->hasMany($model);
}
A
MP
A
MP
A
A
MP
A
MP
И
A
D
И