Fix some enhancements & new features

This commit is contained in:
Ludovic CANDELLIER
2020-07-26 16:51:45 +02:00
parent fcd26d13de
commit 1179b5ca31
54 changed files with 975 additions and 341 deletions

View File

@@ -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');
}
}