[WIP] Fix cosmetics, prices
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user