<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Tracking\Core; use Illuminate\Events\Dispatcher; use Illuminate\Support\ServiceProvider; use ModStart\Admin\Config\AdminMenu; use ModStart\Admin\Widget\DashboardItemA; use ModStart\Core\Dao\ModelUtil; use ModStart\Layout\Row; use Module\Vendor\Admin\Config\AdminWidgetDashboard; class ModuleServiceProvider extends ServiceProvider { public function boot(Dispatcher $Nv3Ie) { AdminMenu::register(function () { return array(array('title' => '溯源系统', 'icon' => 'transport', 'sort' => 150, 'children' => array(array('title' => '防伪码', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeController@index'), array('title' => '防伪查询记录', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeQueryController@index'), array('title' => '溯源流程', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeProcessItemController@index'), array('title' => '批量操作', 'children' => array(array('title' => '批量生成防伪码', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeController@create'), array('title' => '批量修改防伪码', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeController@modify'), array('title' => '批量导出防伪码', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeController@export'), array('title' => '批量录入溯源流程', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeProcessItemController@create'))), array('title' => '溯源流程类别', 'url' => '\\Module\\Tracking\\Admin\\Controller\\CodeProcessController@index'), array('title' => '溯源产品', 'url' => '\\Module\\Tracking\\Admin\\Controller\\ProductController@index'), array('title' => '溯源经销商', 'url' => '\\Module\\Tracking\\Admin\\Controller\\AgentController@index'), array('title' => '溯源系统设置', 'url' => '\\Module\\Tracking\\Admin\\Controller\\ConfigController@index')))); }); AdminWidgetDashboard::registerIcon(function (Row $p4Avz) { $p4Avz->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-qr-code', ModelUtil::count('tracking_code', array()), '防伪码', modstart_admin_url('tracking/code'))); $p4Avz->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-search', ModelUtil::count('tracking_code_query', array()), '查询次数', modstart_admin_url('tracking/code_query'))); $p4Avz->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-category', ModelUtil::count('tracking_product', array()), '溯源产品', modstart_admin_url('tracking/product'))); }); } public function register() { } }