Closed iveliniliev90 closed 3 years ago
Hello! can you provide some code where I can see how you use my package. Today I`m tried to reproduce this problem.
HasTranslations
to category model, added column name
to $translatable variable.Hello! This is my code Category model -
And your package -
Maybe the problem is here
As a temporary solution you can add to your model:
public function toArray(){ return array_merge(parent::toArray(),[ 'translated_name' => $this->name]); }
and when make field provide this field to method withLabelKey.
NestedTreeAttachManyField::make(__('OFFER_CATEGORIES'),'categories','App\Nova\Category') ->withLabelKey('translated_name')
To Fix this error I need change the tree build algorithm.
Thank you. This fix my problem!
HelloI have an issue where I am trying to attach records where the 'name' for each record is a translatable field (I'm using spatie/laravel-translatable and optimistdigital/nova-translatable ).
And when the records are displayed.. i see only undefined, undefined, undefined
Can you fix this please :)