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