I tried to create a pivotModel and add a field for translation to $translatable, but nothing happened.
Is there any way to translate this?
I tried to create a pivotModel and add a field for translation to $translatable, but nothing happened.
Is there any way to translate this?
Hi, i think i’m too late, but maybe someone is looking for this.
You must define ‘pivotKey’ in you relation. Without this data translations do not work.
public $belongsToMany = [
'some' => [
Some::class,
'table' => 'some_table',
'pivotModel' => PivotModel::class,
'pivotKey' => 'id',
'timestamps' => true,
'pivot' => ['description'],
],
];