File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ protected function getMenuItems($menu, ?string $locale = null): array
70
70
71
71
$ items = $ menu ->menuItems ()
72
72
->with ('linkable ' )
73
- ->orderBy ('_lft ' )
73
+ ->orderBy ('order ' )
74
74
->get ();
75
75
76
76
return $ this ->buildMenuTree ($ items ->toArray (), $ locale );
Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ public function menuItems(): HasMany
30
30
{
31
31
return $ this ->hasMany (FilamentFlexibleContentBlockPages::config ()->getMenuItemModel ()::class)
32
32
->whereNull ('parent_id ' )
33
- ->orderBy ('_lft ' );
33
+ ->orderBy ('order ' );
34
34
}
35
35
36
36
public function allMenuItems (): HasMany
37
37
{
38
38
return $ this ->hasMany (FilamentFlexibleContentBlockPages::config ()->getMenuItemModel ()::class)
39
- ->orderBy ('_lft ' );
39
+ ->orderBy ('order ' );
40
40
}
41
41
42
42
public function getMorphClass ()
Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ public function mount(): void
28
28
{
29
29
$ menuModelClass = MenuResource::getModel ();
30
30
$ recordId = request ()->route ('record ' );
31
- $ this ->record = app ($ menuModelClass )->findOrFail ($ recordId );
31
+ $ this ->record = app ($ menuModelClass )
32
+ ->query ()
33
+ ->with ('menuItems.linkable ' )
34
+ ->findOrFail ($ recordId );
32
35
}
33
36
34
37
public function getModel (): string
You can’t perform that action at this time.
0 commit comments