Completed
Pull Request — master (#2)
by reallyli
02:11
created

UnicomponentServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: reallyli
5
 * Date: 18/10/11
6
 * Time: 上午11:28.
7
 */
8
9
namespace Reallyli\LaravelUnicomponent;
10
11
use Illuminate\Support\ServiceProvider;
12
13
class UnicomponentServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Bootstrap the application services.
17
     */
18
    public function boot()
19
    {
20
        $this->publishes([
21
            __DIR__.'/../config/unicomponent.php' => config_path('unicomponent.php'),
22
        ], 'config');
23
    }
24
25
    /**
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $this->app->singleton('unicomponent', function ($app) {
31
            return new UnicomponentServiceManager($app['config']['unicomponent']);
32
        });
33
    }
34
35
    /**s
36
     * @return array
37
     */
38
    public function provides()
39
    {
40
        return ['unicomponent'];
41
    }
42
}
43