add shipping rules
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user