Files
opensem/app/Models/Shop/ArticleAttributeValue.php
2020-05-09 01:05:55 +02:00

22 lines
468 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 AttributeFamily()
{
return $this->belongsTo('App\Models\Shop\ArticleAttributeFamily');
}
public function scopeByFamily($query, $attribute_family_id)
{
return $query->where('attribute_family_id', $attribute_family_id);
}
}