Completed
Push — master ( a77c04...464b27 )
by Andrey
16:47
created

RbacRouteServiceProvider::getRoutesFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Itstructure\LaRbac;
4
5
use Illuminate\Support\Facades\Route;
6
use Illuminate\Foundation\Support\Providers\RouteServiceProvider;
7
8
/**
9
 * Class RbacRouteServiceProvider
10
 *
11
 * @package Itstructure\LaRbac
12
 *
13
 * @author Andrey Girnik <[email protected]>
14
 */
15
class RbacRouteServiceProvider extends RouteServiceProvider
16
{
17
    /**
18
     * This namespace is applied to your controller routes.
19
     * In addition, it is set as the URL generator's root namespace.
20
     * @var string
21
     */
22
    protected $namespace = 'Itstructure\LaRbac\Http\Controllers';
23
24
    /**
25
     * Define your route model bindings, pattern filters, etc.
26
     * @return void
27
     */
28
    public function boot()
29
    {
30
        parent::boot();
31
    }
32
33
    /**
34
     * Define the routes for the application.
35
     * @return void
36
     */
37
    public function map()
38
    {
39
        $this->mapWebRoutes();
40
    }
41
42
    /**
43
     * Define the "web" routes for the application.
44
     * These routes all receive session state, CSRF protection, etc.
45
     * @return void
46
     */
47
    protected function mapWebRoutes()
48
    {
49
        Route::middleware('web')
50
             ->namespace($this->namespace)
51
             ->group($this->getRoutesFile());
52
    }
53
54
    /**
55
     * Get routes file.
56
     * @return mixed
57
     */
58
    private function getRoutesFile()
59
    {
60
        return __DIR__ . DIRECTORY_SEPARATOR . 'routes.php';
61
    }
62
}
63