[WIP] Fix cosmetics, prices

This commit is contained in:
Ludovic CANDELLIER
2020-06-07 23:15:22 +02:00
parent 424fb43b20
commit 066744e082
35 changed files with 230 additions and 193 deletions

View File

@@ -9,9 +9,9 @@ class ArticleAttributeFamily extends Model
protected $guarded = ['id'];
protected $table = 'shop_article_attribute_families';
public function Values()
public function Attributes()
{
return $this->hasMany('App\Models\Shop\ArticleAttributeValue','attribute_family_id');
return $this->hasMany('App\Models\Shop\ArticleAttributeValue');
}
}

View File

@@ -9,14 +9,14 @@ class ArticleAttributeValue extends Model
protected $guarded = ['id'];
protected $table = 'shop_article_attribute_values';
public function AttributeFamily()
public function ArticleAttributeFamily()
{
return $this->belongsTo('App\Models\Shop\ArticleAttributeFamily');
}
public function scopeByFamily($query, $attribute_family_id)
{
return $query->where('attribute_family_id', $attribute_family_id);
return $query->where('article_attribute_family_id', $attribute_family_id);
}
}