Fix some enhancements & new features

This commit is contained in:
Ludovic CANDELLIER
2020-07-26 16:51:45 +02:00
parent fcd26d13de
commit 1179b5ca31
54 changed files with 975 additions and 341 deletions

View File

@@ -9,19 +9,14 @@ class ArticlePrice extends Model
protected $guarded = ['id'];
protected $table = 'shop_article_prices';
public function Article()
public function article_attribute()
{
return $this->belongsTo('App\Models\Shop\ArticleAttribute');
}
public function article()
{
return $this->belongsTo('App\Models\Shop\Article');
}
public function ArticleAttributes()
{
return $this->hasMany('App\Models\Shop\ArticleAttribute');
}
public function scopeByArticle($query, $id)
{
return $query->where('article_id', $id);
}
}