将空 table 添加到带数据的 table

Add empty table to table with data

我是初学者。我在 PHP 和 Laravel 8 中制作我的项目。 我有这个 $array:

array:1 [▼
  "attributes" => array:37 [▼
    "id" => 1
    "hash" => "19f149b6-f7e2-4d61-b3c5-d46ebc92f681"
    "hidden_carrier_data" => 0
    "delivery_name_surname" => null
    "delivery_signature_binary" => null
    "disable_change_status_driver" => 0
  ]
]

我需要将 OLD 添加到此数组:

array:1 [▼
  "old" => array:0
  "attributes" => array:37 [▼
    "id" => 1
    "hash" => "19f149b6-f7e2-4d61-b3c5-d46ebc92f681"
    "hidden_carrier_data" => 0
    "delivery_name_surname" => null
    "delivery_signature_binary" => null
    "disable_change_status_driver" => 0
  ]
]

我怎样才能做到?

请帮帮我

你可以试试

$array["old"] = [...something];

让我知道这是否有效。