1 year ago

select multiple values for column

Posted 1 year ago by nday

hi all!

i have stuck with trying to find a solution for my case

i need to select multiple values from one column but can't find how to do that

i tried:

$flats = DB::table('flats')->whereIn('roomAmount', [3,4])->get();
return view('flats.index', ['flats' => $flats->paginate(10)]);

but instead of expected result i get an error:

Method Illuminate\Support\Collection::paginate does not exist.

paginate works fine when i do select without get(), but then it returns nothing

and without paginate it's not a useful for me, maybe somebody know how to solve this case?

Please sign in or create an account to participate in this conversation.