AssetsServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Botble\Assets\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class AssetsServiceProvider.
9
 *
10
 * @since 22/07/2015 11:23 PM
11
 */
12
class AssetsServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * @var \Illuminate\Foundation\Application
16
     */
17
    protected $app;
18
19
    public function boot()
20
    {
21
        $this->mergeConfigFrom(__DIR__ . '/../../config/assets.php', 'assets');
22
        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'assets');
23
24
        if ($this->app->runningInConsole()) {
25
            $this->publishes([__DIR__ . '/../../config/assets.php' => config_path('assets.php')], 'config');
26
            $this->publishes([__DIR__ . '/../../resources/views' => resource_path('views/vendor/assets')], 'views');
27
        }
28
    }
29
}
30