品牌信息

This commit is contained in:
2025-05-21 11:28:30 +08:00
parent ff07c5bcd9
commit f8fa2bf3a9
17 changed files with 997 additions and 12 deletions
+10 -1
View File
@@ -47,7 +47,7 @@ class BrandModel extends Model
/**
* 允许自动填充模型字段
*/
protected $fillable = ['id', 'status', 'sort', 'created_at', 'updated_at'];
protected $fillable = ['id', 'status', 'sort', 'toppic', 'descpic', 'logo', 'letter', 'created_at', 'updated_at'];
/**
* 不允许自动填充模型字段
@@ -64,4 +64,13 @@ class BrandModel extends Model
{
return $this->hasMany(BrandTranslationModel::class, 'brand_id');
}
public function banner()
{
return $this->hasMany(BrandBannerModel::class, 'brand_id','id');
}
public function trait()
{
return $this->hasMany(BrandTraitModel::class, 'brand_id','id');
}
}