Closed nekooee closed 2 years ago
I added protected $translationForeignKey = 'attribute_product_id';
to "AttributeProduct" pivot model. now work fine.
This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days
I wrote my code according to this tutorial:
https://docs.astrotomic.info/laravel-translatable/usage/pivot-model
my pivot model:
and translation model for pivot model:
I tried to save the translation in the controller:
But I get this error:
message: "App\Models\AttributeProduct::getTranslationRelationKey(): Return value must be of type string, null returned"
please help me. I really need to know the solution to this problem.