logAll() ->logOnlyDirty() ->dontLogEmptyChanges(); } protected function formattedName(): Attribute { return Attribute::make( get: fn () => ucfirst($this->name), ); } public function products(): BelongsToMany { return $this->belongsToMany(Product::class, 'product_categories') ->using(ProductCategory::class); } }