Completed
Push — master ( d3edc0...9b98b0 )
by Mahmoud
07:44
created

MiddlewareServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Debugger\Providers;
4
5
use App\Containers\Debugger\Middlewares\RequestsMonitorMiddleware;
6
use App\Containers\Debugger\Traits\DebuggerTrait;
7
use App\Port\Middleware\Providers\PortMiddlewareServiceProvider;
8
9
/**
10
 * Class MiddlewareServiceProvider.
11
 *
12
 * The Main Service Provider of this container, it will be automatically registered in the framework.
13
 *
14
 * @author  Mahmoud Zalt <[email protected]>
15
 */
16
class MiddlewareServiceProvider extends PortMiddlewareServiceProvider
17
{
18
    use DebuggerTrait;
19
20
    protected $middleware = [
21
22
    ];
23
24
    protected $middlewareGroups = [
25
        'web' => [
26
27
        ],
28
        'api' => [
29
            // Hello API Requests Monitor
30
            RequestsMonitorMiddleware::class,
31
        ],
32
    ];
33
34
    protected $routeMiddleware = [
35
36
    ];
37
38
    /**
39
     * Perform post-registration booting of services.
40
     */
41
    public function boot()
42
    {
43
        $this->loadContainersInternalMiddlewares();
44
    }
45
46
    /**
47
     * Register anything in the container.
48
     */
49
    public function register()
50
    {
51
        $this->runQueryDebugger(true, true);
52
    }
53
}
54