How can I transform this collection to array and eject "whereNotIn" using a Laravel query, like this:
->whereNotIn('id', ['collection'])->get();'
Collection {#259 ▼
#items: array:3 [▼
0 => {#257 ▼
+"id": 2
}
1 => {#256 ▼
+"id": 3
}
2 => {#237 ▼
+"id": 6
}
]}