add shipping rules

This commit is contained in:
Ludovic CANDELLIER
2023-07-16 14:45:42 +02:00
parent 297dcc62d2
commit 39c80ce6d1
459 changed files with 6219 additions and 5416 deletions

View File

@@ -10,6 +10,7 @@ class Price extends Model
use HasRelationships;
protected $guarded = ['id'];
protected $table = 'shop_prices';
public function article()
@@ -24,11 +25,11 @@ class Price extends Model
public function scopeByArticle($query, $id)
{
return $query->where($this->table . '.article_id', $id);
return $query->where($this->table.'.article_id', $id);
}
public function scopeByArticleNature($query, $id)
{
return $query->where($this->table . '.article_family_id', $id);
return $query->where($this->table.'.article_family_id', $id);
}
}