25 lines
561 B
PHP
25 lines
561 B
PHP
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
|
|
|
class ArticleAttributeFamily extends Model
|
|
{
|
|
use HasRelationships;
|
|
|
|
protected $guarded = ['id'];
|
|
protected $table = 'shop_article_attribute_families';
|
|
|
|
public function values()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\ArticleAttributeValue');
|
|
}
|
|
|
|
public function articles()
|
|
{
|
|
return $this->hasManyThrough('App\Models\Shop\ArticleAttribute','App\Models\Shop\ArticleAttributeValue');
|
|
}
|
|
|
|
} |