We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72b86ad commit 86349c9Copy full SHA for 86349c9
src/Models/MenuItem.php
@@ -40,7 +40,10 @@ class MenuItem extends Model
40
'use_model_title' => 'boolean',
41
];
42
43
- public $translatable = ['label'];
+ public function getTranslatableAttributes(): array
44
+ {
45
+ return array_merge($this->translatable, ['slug']);
46
+ }
47
48
public function getTable()
49
{
@@ -54,7 +57,7 @@ public function menu(): BelongsTo
54
57
55
58
public function linkable(): MorphTo
56
59
- return $this->morphTo(__FUNCTION__, 'linkable_type', 'linkable_id');
60
+ return $this->morphTo('linkable', 'linkable_type', 'linkable_id');
61
}
62
63
public function getUrl(?string $locale = null): ?string
0 commit comments