UploadRouteServiceProvider::getRoutesFile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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