Fix on new model
This commit is contained in:
@@ -16,7 +16,7 @@ class ArticleAttribute extends Model
|
||||
|
||||
public function attribute_value()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Shop\ArticleAttributeValue');
|
||||
return $this->belongsTo('App\Models\Shop\ArticleAttributeValue', 'article_attribute_value_id');
|
||||
}
|
||||
|
||||
public function prices()
|
||||
|
||||
@@ -20,7 +20,7 @@ class ArticlePrices
|
||||
|
||||
public static function getByArticleWithAttribute($id)
|
||||
{
|
||||
return ArticlePrice::with('article_attribute')->byArticle($id)->get();
|
||||
return ArticlePrice::with('article_attribute.attribute_value')->byArticle($id)->get();
|
||||
}
|
||||
|
||||
public static function getDatatable()
|
||||
|
||||
Reference in New Issue
Block a user