Test Failed
Push — master ( befccc...a4b299 )
by Gianluca
19:49
created

ProductItem::configurationFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace Mongi\Mongicommerce\Models;
5
6
7
use Illuminate\Database\Eloquent\Factories\HasFactory;
8
use Illuminate\Database\Eloquent\Model;
9
10
class ProductItem extends Model
11
{
12
    use HasFactory;
13
14
    public function details(){
15
        return $this->hasMany(ProductItemDetail::class,'product_item_id');
16
    }
17
18
    public function configurationFields(){
19
        return $this->hasMany(ProductConfigurationField::class,'product_item_id');
20
    }
21
22
    public function product(){
23
        return $this->belongsTo(Product::class);
24
    }
25
26
    public function category(){
27
        return $this->belongsTo(Category::class);
28
    }
29
30
}
31