Laravel 8 Arr::set() {#collection-method}
Arr::set
函数使用「.」符号在多维数组中设置指定键的值:
use Illuminate\Support\Arr;
$array = ['products' => ['desk' => ['price' => 100]]];
Arr::set($array, 'products.desk.price', 200);
// ['products' => ['desk' => ['price' => 200]]]