change icons, css, add routing to merchandise, add mail templater, fixes
This commit is contained in:
@@ -141,12 +141,12 @@ class Article extends Model implements HasMedia
|
||||
|
||||
public function scopeByProduct($query, $model)
|
||||
{
|
||||
return $query->where($this->table . '.product_type', $model);
|
||||
return $model ? $query->where($this->table . '.product_type', $model) : $query;
|
||||
}
|
||||
|
||||
public function scopeByProductId($query, $model_id)
|
||||
public function scopeByProductId($query, $product_id)
|
||||
{
|
||||
return $query->where($this->table . '.product_id', $model_id);
|
||||
return $product_id ? $query->where($this->table . '.product_id', $product_id) : $query;
|
||||
}
|
||||
|
||||
public function scopeByTag($query, $tag_id)
|
||||
|
||||
@@ -25,14 +25,14 @@ class ArticleNature extends Model
|
||||
return $query->where($this->table . '.id', $id);
|
||||
}
|
||||
|
||||
public function scopeByBotanic($query);
|
||||
public function scopeByBotanic($query)
|
||||
{
|
||||
return $query->where($this->table . '.product_type', 1);
|
||||
return $query->ByProductType(1);
|
||||
}
|
||||
|
||||
public function scopeByMerchandise($query);
|
||||
public function scopeByMerchandise($query)
|
||||
{
|
||||
return $query->where($this->table . '.product_type', 2);
|
||||
return $query->ByProductType(2);
|
||||
}
|
||||
|
||||
public function scopeByProductType($query, $type)
|
||||
|
||||
Reference in New Issue
Block a user