I am trying to insert data from a table to another but I want, when I transfer this data to other table ids to change. For example(Table1 ID=1001 -> Table2 custom\_id=custom\_1001). I'm trying to do it in Laravel.

This is how I transfer data from table1 to table2. But I don't now how to add 'custom\_' before id on table2

```
$qry = DB::table('table1')->get();

foreach($qry as $key => $data_in) {
    DB::table('table2')->insert([
        "custom_id" => $data_in->id, 
        "status" => $data_in->status
    ]);
}

```