addLink('管理首页', admin_route('home.index'), true); $this->addLink('订单管理', admin_route('home.index')); $this->addLink('商品管理', admin_route('products.index')); $this->addLink('会员管理', admin_route('home.index')); $this->addLink('营销管理', admin_route('home.index')); $this->addLink('系统设置', admin_route('home.index')); } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View|\Closure|string */ public function render() { return view('components.admin.header'); } public function addLink($title, $url, $active = false) { $this->links[] = [ 'title' => $title, 'url' => $url, 'active' => $active ]; } }