I have next SQL query:
SELECT summary_table.device_id, WEEKDAY(summary_table.day) as day, AVG(summary_table.shows) as avg_shows FROM ( SELECT device
Laravel is using PDO library. Sadly, binding with PDO doesn't work with WHERE IN. You can read about it here.
WHERE IN
So what you have to do is to put prepared string in your query like this:
"(...) WHERE device_id IN (".array(implode(',', $var)).") (...)"