Are you only displaying the parent categories in your Nova resource and not the child categories?
what about this:
public function fields(NovaRequest $request)
{
return [
//ID::make(),
hasMany::make('Child Speciality', 'childSpeciality', Speciality::class)->withMeta(['value' => function () {
return $this->childSpeciality->map(function ($speciality) {
return $speciality->name;
})->implode(', ');
}]),
Text::make('Category', 'name'),
];
}
loops over the child categories, retrieve their names and then concatenate them into a comma-separated string. The resulting string will be displayed in the Child Speciality field of your Nova resource