StrongholdServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 10
1
<?php
2
3
namespace ArgentCrusade\Stronghold\Providers;
4
5
use ArgentCrusade\Stronghold\Contracts\OneTimeTokensRepositoryInterface;
6
use ArgentCrusade\Stronghold\OneTimeTokensRepository;
7
use Illuminate\Support\ServiceProvider;
8
9
class StrongholdServiceProvider extends ServiceProvider
10
{
11
    public function boot()
12
    {
13
        $this->loadMigrationsFrom(
14
            realpath(__DIR__.'/../../database/migrations')
15
        );
16
17
        $configPath = realpath(__DIR__.'/../../config/stronghold.php');
18
19
        $this->publishes([
20
            $configPath => config_path('stronghold.php')
21
        ], 'config');
22
23
        $this->mergeConfigFrom($configPath, 'stronghold');
24
    }
25
26
    public function register()
27
    {
28
        $this->app->bind(
29
            OneTimeTokensRepositoryInterface::class,
30
            config('stronghold.tokens_repository', OneTimeTokensRepository::class)
31
        );
32
    }
33
}
34