Your problem is here:
$days1 = implode(',', Input::get('days'));
This gets converted to string "8.4"
Then when you run
$query->whereIn('days', array($days1))->orderBy('days', 'asc');
array($days1) converts "8.4" to
Array
(
[0] => 8,4
)
8,4 then gets converted to an int to match the column in your db. (int)8,4 = 8
Hence only rows with 8.
So either don't implode at the start, or explode(",", $days1) instead of array($days1);
Makes sense?
Already solved this ...
As the same way, as You proposed.
Thanks !
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community