PayantServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Laravel Payant package.
5
 *
6
 * (c) Emmanuel Awotunde <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Olaoluwa98\Payant;
13
14
use Illuminate\Support\ServiceProvider;
15
16
class PayantServiceProvider extends ServiceProvider
17
{
18
19
    /*
20
    * Indicates if loading of the provider is deferred.
21
    *
22
    * @var bool
23
    */
24
    protected $defer = false;
25
26
    /**
27
    * Publishes all the config file this package needs to function
28
    */
29
    public function boot()
30
    {
31
        $config = realpath(__DIR__.'/../resources/config/payant.php');
32
33
        $this->publishes([
34
            $config => config_path('payant.php')
35
        ]);
36
    }
37
38
    /**
39
    * Register the application services.
40
    */
41
    public function register()
42
    {
43
        $this->app->bind('laravel-payant', function () {
44
45
            return new Payant;
46
47
        });
48
    }
49
50
    /**
51
    * Get the services provided by the provider
52
    * @return array
53
    */
54
    public function provides()
55
    {
56
        return ['laravel-payant'];
57
    }
58
}
59