作者 lyh

gx

@@ -246,7 +246,7 @@ class ProductController extends BaseController @@ -246,7 +246,7 @@ class ProductController extends BaseController
246 */ 246 */
247 public function categoryName($product_id,$data){ 247 public function categoryName($product_id,$data){
248 $cateRelatedModel = new CategoryRelated(); 248 $cateRelatedModel = new CategoryRelated();
249 - $category_id = $cateRelatedModel->where('product_id',$product_id)->plack('cate_id')->toArray(); 249 + $category_id = $cateRelatedModel->where('product_id',$product_id)->pluck('cate_id')->toArray();
250 $category_name = ''; 250 $category_name = '';
251 if(!empty($category_id) && !empty($data)){ 251 if(!empty($category_id) && !empty($data)){
252 foreach ($category_id as $v){ 252 foreach ($category_id as $v){