chaoyu/app/widget/Crumbs.php

18 lines
336 B
PHP
Raw Normal View History

<?php
namespace app\widget;
use app\model\Category;
use think\facade\View;
class Crumbs
{
public function index($categoryId)
{
$list = array_reverse(Category::getListForCrumbs($categoryId));
$data = [
'crumbs' => $list
];
return View::assign($data)->fetch('public/crumbs');
}
}