slug = Str::slug($type->name); }); static::updating(function ($type) { $type->slug = Str::slug($type->name); }); } public function products() { return $this->hasMany(Products::class, 'label_id'); } }