LaravelMediaServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 8 2
1
<?php
2
3
namespace Owowagency\LaravelMedia;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LaravelMediaServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return  void
13
     */
14
    public function boot(): void
15
    {
16
        $this->loadTranslationsFrom(__DIR__.'/../translations', 'laravel-media');
17
18
        if ($this->app->runningInConsole()) {
19
            $this->publishes([
20
                __DIR__.'/../config/config.php' => config_path('laravel-media.php'),
21
            ], 'config');
22
        }
23
    }
24
25
    /**
26
     * Register the application services.
27
     *
28
     * @return void
29
     */
30
    public function register(): void
31
    {
32
        // Automatically apply the package configuration
33
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-media');
34
    }
35
}
36