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
|
6 |
|
public function getBasePath() |
35
|
|
|
{ |
36
|
6 |
|
return dirname(__DIR__); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/* ------------------------------------------------------------------------------------------------ |
40
|
|
|
| Main Functions |
41
|
|
|
| ------------------------------------------------------------------------------------------------ |
42
|
|
|
*/ |
43
|
|
|
/** |
44
|
|
|
* Register the service provider. |
45
|
|
|
*/ |
46
|
6 |
|
public function register() |
47
|
|
|
{ |
48
|
6 |
|
$this->registerConfig(); |
49
|
6 |
|
$this->registerSidebarItems(); |
50
|
6 |
|
$this->registerProviders([ |
51
|
6 |
|
CoreServiceProvider::class, |
52
|
2 |
|
Providers\AuthorizationServiceProvider::class, |
53
|
2 |
|
Providers\ViewComposerServiceProvider::class, |
54
|
2 |
|
\Arcanedev\LaravelMarkdown\LaravelMarkdownServiceProvider::class, |
55
|
2 |
|
]); |
56
|
6 |
|
$this->registerConsoleServiceProvider(Providers\CommandServiceProvider::class); |
57
|
6 |
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Boot the service provider. |
61
|
|
|
*/ |
62
|
6 |
|
public function boot() |
63
|
|
|
{ |
64
|
6 |
|
parent::boot(); |
65
|
|
|
|
66
|
6 |
|
$this->registerProvider(Providers\RouteServiceProvider::class); |
67
|
6 |
|
$this->registerProvider(Providers\ViewComposerServiceProvider::class); |
68
|
|
|
|
69
|
|
|
// Publishes |
70
|
6 |
|
$this->publishConfig(); |
71
|
6 |
|
$this->publishMigrations(); |
72
|
6 |
|
$this->publishViews(); |
73
|
6 |
|
$this->publishTranslations(); |
74
|
6 |
|
$this->publishSidebarItems(); |
75
|
6 |
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Get the services provided by the provider. |
79
|
|
|
* |
80
|
|
|
* @return array |
81
|
|
|
*/ |
82
|
3 |
|
public function provides() |
83
|
|
|
{ |
84
|
|
|
return [ |
85
|
|
|
// |
86
|
3 |
|
]; |
87
|
|
|
} |
88
|
|
|
} |
89
|
|
|
|