Completed
Push — master ( f71a38...e6a22b )
by Sebastian
03:58
created

LocaleServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace App\Services\Locale;
4
5
use Illuminate\Translation\TranslationServiceProvider;
6
7
class LocaleServiceProvider extends TranslationServiceProvider
8
{
9
    public function register()
10
    {
11
        $this->app->singleton(CurrentLocale::class);
12
        $this->app->alias(CurrentLocale::class, 'currentLocale');
13
14
        parent::register();
15
    }
16
17
    protected function registerLoader()
18
    {
19
        $this->app->singleton('translation.loader', function ($app) {
20
            return new TranslationLoader($app['files'], $app['path.lang']);
21
        });
22
    }
23
}
24