-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathModuleServiceProvider.php
More file actions
49 lines (43 loc) · 1.16 KB
/
Copy pathModuleServiceProvider.php
File metadata and controls
49 lines (43 loc) · 1.16 KB
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
40
41
42
43
44
45
46
47
48
49
<?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
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(Dispatcher $events)
{
if (method_exists(ModuleClassLoader::class, 'addClass')) {
ModuleClassLoader::addClass('MNav', __DIR__ . '/../Helpers/MNav.php');
}
AdminMenu::register(function () {
return [
[
'title' => '物料管理',
'icon' => 'description',
'sort' => 200,
'children' => [
[
'title' => '导航设置',
'url' => '\Module\Nav\Admin\Controller\NavController@index',
],
]
]
];
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
}
}