Fix some enhancements & new features
This commit is contained in:
@@ -3,15 +3,23 @@
|
||||
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 Attributes()
|
||||
public function values()
|
||||
{
|
||||
return $this->hasMany('App\Models\Shop\ArticleAttributeValue');
|
||||
}
|
||||
|
||||
public function articles()
|
||||
{
|
||||
return $this->hasManyThrough('App\Models\Shop\ArticleAttribute','App\Models\Shop\ArticleAttributeValue');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user