jeudi 7 septembre 2017

transform collective to array laravel, laravel5

How can I transform this collection to array and eject "whereNotIn" 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
}
]}

Thank you!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire