Completed
Push — master ( 800114...d023f1 )
by ARCANEDEV
04:49
created

SeoServiceProvider::publishAssets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
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 32
    public function register()
34
    {
35 32
        parent::register();
36
37 32
        $this->registerConfig();
38 32
        $this->registerSidebarItems();
39 32
        $this->registerProviders([
40 32
            Providers\AuthorizationServiceProvider::class,
41 16
            Providers\PackagesServiceProvider::class,
42 16
            Providers\RouteServiceProvider::class,
43 16
            Providers\ViewComposerServiceProvider::class,
44 16
        ]);
45
46 32
        $this->registerConsoleServiceProvider(Providers\CommandServiceProvider::class);
47 32
    }
48
49
    /**
50
     * Boot the service provider.
51
     */
52 32
    public function boot()
53
    {
54 32
        parent::boot();
55
56
        // Publishes
57 32
        $this->publishConfig();
58 32
        $this->publishViews();
59 32
        $this->publishTranslations();
60 32
        $this->publishSidebarItems();
61 32
        $this->publishAssets();
62
63 32
        $this->loadMigrations();
64 32
    }
65
66
    /**
67
     * Get the services provided by the provider.
68
     *
69
     * @return array
70
     */
71 4
    public function provides()
72
    {
73
        return [
74
            //
75 4
        ];
76
    }
77
78
    /* -----------------------------------------------------------------
79
     |  Other Methods
80
     | -----------------------------------------------------------------
81
     */
82
83
    /**
84
     * Publish the assets.
85
     */
86 32
    private function publishAssets()
87
    {
88 32
        $this->publishes([
89 32
            $this->getResourcesPath().DS.'assets'.DS => resource_path("assets/_{$this->vendor}/{$this->package}"),
90 32
        ], 'assets');
91 32
    }
92
}
93