Laravel内爆阵列

时间:2018-05-12 15:33:18

标签: php laravel

我有这段代码:

$category = $product->category;
if(!empty($category->category_id)){
  $category = [$category->parent->title,$category->title];
}

它给出的结果如下:

Default Category first level category 

我想要的是在>Default Category之间添加first level category

我该怎么做?

0 个答案:

没有答案