MySQL IN statement using Laravel Im having the user filling checkboxes in my view for each year so that they can query based on selected years. The query is looking for a pH value between a minimum and maximum value. As you can see there can be a variety of different years selected. View @foreach($years as $year) {{ Form::checkbox('selectedYears[]', $year->year) }} {{ $year->year }} @endforeach In my controller i then have something like this: Controller $implodeYears = implode(', ',$input['selectedYears']); DB::select('SELECT samples.*, costumers.* FROM