2020-11-25 01:07:06 +00:00
|
|
|
<?php
|
|
|
|
namespace app\widget;
|
|
|
|
|
|
|
|
use app\model\Category;
|
|
|
|
use think\facade\View;
|
|
|
|
|
|
|
|
class Crumbs
|
|
|
|
{
|
|
|
|
public function index($categoryId)
|
|
|
|
{
|
2020-11-26 02:28:53 +00:00
|
|
|
$list = array_reverse(Category::getListForCrumbs($categoryId));
|
2020-11-25 01:07:06 +00:00
|
|
|
$data = [
|
2020-11-26 02:28:53 +00:00
|
|
|
'crumbs' => $list
|
2020-11-25 01:07:06 +00:00
|
|
|
];
|
|
|
|
return View::assign($data)->fetch('public/crumbs');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|