get all rows in single query with multiple id
I have a asset_request table with fields id and request_id. I want to select multiple rows with specific id $ids = $request->ids // 5,6
I want to select only 5th and 6th rows in request table
$ids = $request->ids;
$asset_requst=asset_request::whereIn('id',array($ids))->first(); //gets only 6th row.needto get both rows
from Laravel Questions and Answers https://laravelquestions.com/laravel/get-all-rows-in-single-query-with-multiple-id/
via Lzo Media
No comments:
Post a Comment