答案 0 :(得分:0)
试试这个:
$products = DB::table('products as p')
->join('manufacturers', 'manufacturers.id', '=', 'p.productManufacturerID')
->select('p.productSKU', 'p.productName','p.productPrice',
'p.productSize','p.productDescription','p.productQuantity',
'manufacturers.brandName')
->where('p.productCategoryID', $category->id)
->get()->toArray();
由于您没有从product_options表中选择任何内容,只需将其从查询中删除即可。