📅  最后修改于: 2022-03-11 14:54:37.190000             🧑  作者: Mango
$go = $go->sort(function ($a, $b) use ($order) {
$pos_a = array_search($a->colour, $order);
$pos_b = array_search($b->colour, $order);
return $pos_a - $pos_b;
});