fix sort order sidebar menu and percentage bigdata resume
This commit is contained in:
@@ -22,6 +22,11 @@ class MenuResource extends JsonResource
|
||||
'url' => $this->url,
|
||||
'sort_order' => $this->sort_order,
|
||||
'parent' => $this->parent ? new MenuResource($this->parent) : null,
|
||||
'children' => $this->when($this->relationLoaded('children'), function () {
|
||||
return $this->children->sortBy('sort_order')->map(function ($child) {
|
||||
return new MenuResource($child);
|
||||
});
|
||||
}),
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user