luck-draw/app/widget/Crumbs.php

17 lines
296 B
PHP

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