📅  最后修改于: 2022-03-11 14:53:39.101000             🧑  作者: 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;
});