1
|
|
|
<?php namespace Arcanesoft\Blog; |
2
|
|
|
|
3
|
|
|
use Arcanesoft\Core\Bases\PackageServiceProvider; |
4
|
|
|
use Arcanesoft\Core\CoreServiceProvider; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class BlogServiceProvider |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Blog |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class BlogServiceProvider extends PackageServiceProvider |
13
|
|
|
{ |
14
|
|
|
/* ------------------------------------------------------------------------------------------------ |
15
|
|
|
| Properties |
16
|
|
|
| ------------------------------------------------------------------------------------------------ |
17
|
|
|
*/ |
18
|
|
|
/** |
19
|
|
|
* Package name. |
20
|
|
|
* |
21
|
|
|
* @var string |
22
|
|
|
*/ |
23
|
|
|
protected $package = 'blog'; |
24
|
|
|
|
25
|
|
|
/* ------------------------------------------------------------------------------------------------ |
26
|
|
|
| Getters & Setters |
27
|
|
|
| ------------------------------------------------------------------------------------------------ |
28
|
|
|
*/ |
29
|
|
|
/** |
30
|
|
|
* Get the base path of the package. |
31
|
|
|
* |
32
|
|
|
* @return string |
33
|
|
|
*/ |
34
|
8 |
|
public function getBasePath() |
35
|
|
|
{ |
36
|
8 |
|
return dirname(__DIR__); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/* ------------------------------------------------------------------------------------------------ |
40
|
|
|
| Main Functions |
41
|
|
|
| ------------------------------------------------------------------------------------------------ |
42
|
|
|
*/ |
43
|
|
|
/** |
44
|
|
|
* Register the service provider. |
45
|
|
|
*/ |
46
|
8 |
|
public function register() |
47
|
|
|
{ |
48
|
8 |
|
$this->registerConfig(); |
49
|
8 |
|
$this->registerSidebarItems(); |
50
|
8 |
|
$this->registerProviders([ |
51
|
8 |
|
CoreServiceProvider::class, |
52
|
4 |
|
Providers\AuthorizationServiceProvider::class, |
53
|
4 |
|
Providers\ViewComposerServiceProvider::class, |
54
|
4 |
|
]); |
55
|
8 |
|
$this->registerConsoleServiceProvider(Providers\CommandServiceProvider::class); |
56
|
8 |
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Boot the service provider. |
60
|
|
|
*/ |
61
|
|
|
public function boot() |
62
|
|
|
{ |
63
|
|
|
parent::boot(); |
64
|
|
|
|
65
|
|
|
$this->registerProvider(Providers\RouteServiceProvider::class); |
66
|
|
|
|
67
|
|
|
// Publishes |
68
|
|
|
$this->publishConfig(); |
69
|
|
|
$this->publishMigrations(); |
70
|
|
|
$this->publishViews(); |
71
|
|
|
$this->publishTranslations(); |
72
|
|
|
$this->publishSidebarItems(); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Get the services provided by the provider. |
77
|
|
|
* |
78
|
|
|
* @return array |
79
|
|
|
*/ |
80
|
|
|
public function provides() |
81
|
|
|
{ |
82
|
|
|
return [ |
83
|
|
|
// |
84
|
|
|
]; |
85
|
|
|
} |
86
|
|
|
} |
87
|
|
|
|