Q:

Laravel 5.5 - whereIn array

In Laravel 5.5, I am trying to get all fruits that have a fruit_id from an array like this..
$fruits = Fruit::whereIn('fruit_id',[6,23,5,73]);

This is not returning any results, am I doing this correctly or is there a better way of doing things?

A:

You forgot to execute the query. Add ->get():
$fruits = Fruit::whereIn('fruit_id',[6,23,5,73])->get();

