AttributeGroup   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A attributes() 0 3 1
A categories() 0 3 1
1
<?php 
2
3
namespace Hideyo\Ecommerce\Framework\Services\Attribute\Entity;
4
5
use Hideyo\Ecommerce\Framework\Services\BaseModel;
6
7
class AttributeGroup extends BaseModel
8
{
9
    /**
10
     * The database table used by the model.
11
     *
12
     * @var string
13
     */
14
    protected $table = 'attribute_group';
15
16
    // Add the 'avatar' attachment to the fillable array so that it's mass-assignable on this model.
17
    protected $fillable = ['type', 'default_value', 'title', 'filter', 'shop_id', 'modified_by_user_id'];
18
19
    public function categories()
20
    {
21
        return $this->belongsToMany('ProductCategory', 'product_category_related_extra_field');
22
    }
23
24
    public function attributes()
25
    {
26
        return $this->hasMany('Hideyo\Ecommerce\Framework\Services\Attribute\Entity\Attribute');
27
    }
28
}
29