LaravelRequestBenchmarkServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Mtolhuys\LaravelRequestBenchmark;
4
5
use Illuminate\Routing\Router;
6
use Illuminate\Support\ServiceProvider;
7
8
class LaravelRequestBenchmarkServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     * @param Router $router
13
     */
14
    public function boot(Router $router)
15
    {
16
        $router->aliasMiddleware('benchmark', LaravelRequestBenchmark::class);
17
        $this->loadRoutesFrom(__DIR__.'/routes.php');
18
        $this->loadViewsFrom(__DIR__ . '/views', 'request-benchmark');
19
20
        $this->publishes([
21
            __DIR__ . '/config' => config_path('request-benchmark.php'),
22
        ]);
23
24
        $this->publishes([
25
            __DIR__ . '/views' => resource_path('views/vendor/request-benchmark'),
26
        ], 'views');
27
    }
28
29
    /**
30
     * Register the application services.
31
     */
32
    public function register()
33
    {
34
        $this->mergeConfigFrom(__DIR__ . '/config/request-benchmark.php', 'request-benchmark');
35
    }
36
37
}
38