*/ protected $fillable = [ 'name', 'type', 'status', 'brand_id' ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'type' => CampaignTypes::class, 'status' => 'bool' ]; public function brand(): BelongsTo { return $this->belongsTo(Brand::class); } public function coupons(): BelongsToMany { return $this->belongsToMany(Coupon::class); } }