Commit e637f593 authored by 康帅杰's avatar 康帅杰 :speech_balloon:
Browse files

add menu sort

parent bc3aba7b
No related merge requests found
Showing with 4 additions and 1 deletion
+4 -1
......@@ -27,6 +27,9 @@ class User extends Model
foreach($this->roles as $role){
$re = array_merge($re,$role->side_menu);
}
return collect($re)->unique('id')->toArray();
// $re = collect($re)->unique('id');
// $re = $re->sortBy('id');
// return $re->values()->all();
return collect($re)->unique('id')->sortBy('id')->values()->all();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment