update bread crumb
This commit is contained in:
parent
891e1db59d
commit
8025bb9160
|
|
@ -29,6 +29,8 @@ Breadcrumbs::for('product', function (BreadcrumbTrail $trail, $product) {
|
||||||
$category = $productModel->categories->first();
|
$category = $productModel->categories->first();
|
||||||
if ($category) {
|
if ($category) {
|
||||||
$trail->parent('category', $category);
|
$trail->parent('category', $category);
|
||||||
|
} else {
|
||||||
|
$trail->parent('home');
|
||||||
}
|
}
|
||||||
$trail->push($product['name'], shop_route('products.show', $productModel));
|
$trail->push($product['name'], shop_route('products.show', $productModel));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue