slug)) { $category->slug = Str::slug($category->name); } }); } public function medicines(): HasMany { return $this->hasMany(Medicine::class); } }