Completed
Push — master ( ab976d...5d1483 )
by Chris
02:55
created

InspirationalQuotesServiceProvider::boot()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
rs 9.9
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Cion\InspirationalQuotes;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class InspirationalQuotesServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        if ($this->app->runningInConsole()) {
15
            $this->publishes([
16
                __DIR__.'/../config/config.php' => config_path('inspirational-quotes.php'),
17
            ], 'config');
18
19
            // Registering package commands.
20
            // $this->commands([]);
21
        }
22
    }
23
24
    /**
25
     * Register the application services.
26
     */
27
    public function register()
28
    {
29
        // Automatically apply the package configuration
30
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'inspirational-quote');
31
32
        // Register the main class to use with the facade
33
        $this->app->singleton('inspirational-quote', function () {
34
            return new InspirationalQuotes;
35
        });
36
    }
37
}
38