Level 2
go like this
$resultall = $Result1 . ' ' . $Result2;
Result1 = Product::select('product_detail_id',
'product_name as title')
->where('category_id', 6)
->where('company_id', 3)
->get();
if($idArray){
$result2 = Product::select('product_detail_id',
'product_name as title')
->whereIn('category_id', $idArray)
->where('company_id', 1)
->get();
}
Need to merge $result1 and $result2 and paginate total result
Please or to participate in this conversation.