File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ class MenuItem extends Model
4040 'use_model_title ' => 'boolean ' ,
4141 ];
4242
43+ public $ translatable = ['label ' ];
44+
4345 public function getTable ()
4446 {
4547 return FilamentFlexibleContentBlockPages::config ()->getMenuItemsTable ();
@@ -52,7 +54,7 @@ public function menu(): BelongsTo
5254
5355 public function linkable (): MorphTo
5456 {
55- return $ this ->morphTo ();
57+ return $ this ->morphTo (__FUNCTION__ , ' linkable_type ' , ' linkable_id ' );
5658 }
5759
5860 public function getUrl (?string $ locale = null ): ?string
@@ -104,9 +106,4 @@ public function getMorphClass()
104106 {
105107 return 'filament-flexible-content-block-pages::menu-item ' ;
106108 }
107-
108- protected function getTranslatableAttributes (): array
109- {
110- return ['label ' ];
111- }
112109}
You can’t perform that action at this time.
0 commit comments