22 lines
483 B
PHP
22 lines
483 B
PHP
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ArticleAttributeValue extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
protected $table = 'shop_article_attribute_values';
|
|
|
|
public function ArticleAttributeFamily()
|
|
{
|
|
return $this->belongsTo('App\Models\Shop\ArticleAttributeFamily');
|
|
}
|
|
|
|
public function scopeByFamily($query, $attribute_family_id)
|
|
{
|
|
return $query->where('article_attribute_family_id', $attribute_family_id);
|
|
}
|
|
|
|
} |