forked from modstart/ModStartBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleServiceProvider.php
More file actions
39 lines (31 loc) · 931 Bytes
/
Copy pathModuleServiceProvider.php
File metadata and controls
39 lines (31 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Module\Nav\Core;
use Illuminate\Events\Dispatcher;
use Illuminate\Support\ServiceProvider;
use ModStart\Admin\Config\AdminMenu;
use ModStart\Module\ModuleClassLoader;
class ModuleServiceProvider extends ServiceProvider
{
public function boot(Dispatcher $events)
{
if (method_exists(ModuleClassLoader::class, 'addClass')) {
ModuleClassLoader::addClass('MNav', __DIR__ . '/../Helpers/MNav.php');
}
AdminMenu::register([
[
'title' => '物料管理',
'icon' => 'description',
'sort' => 200,
'children' => [
[
'title' => '导航配置',
'url' => '\Module\Nav\Admin\Controller\NavController@index',
],
]
]
]);
}
public function register()
{
}
}