Passed
Push — dev5a ( 2c238c...96dd50 )
by Ron
07:38
created

RouteServiceProvider::mapTechTipRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php
2
3
namespace App\Providers;
4
5
use Illuminate\Support\Facades\Route;
6
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
7
8
class RouteServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * This namespace is applied to your controller routes.
12
     * In addition, it is set as the URL generator's root namespace.
13
     */
14
    protected $namespace = 'App\Http\Controllers';
15
    public const HOME    = '/dashboard';
16
17
    /**
18
     * Define your route model bindings, pattern filters, etc.
19
     */
20 638
    public function boot()
21
    {
22 638
        parent::boot();
23 638
    }
24
25
    /**
26
     * Define the routes for the application.
27
     */
28 638
    public function map()
29
    {
30
        // $this->mapApiRoutes();
31 638
        $this->mapWebRoutes();
32 638
        $this->mapUserRoutes();
33 638
        $this->mapAdminRoutes();
34 638
        $this->mapCustomerRoutes();
35 638
        $this->mapTechTipRoutes();
36 638
    }
37
38
    /**
39
     * Define the basic web routes for the application.
40
     */
41 638
    protected function mapWebRoutes()
42
    {
43 638
        Route::middleware('web')
44 638
                ->namespace($this->namespace)
45 638
                ->group(base_path('routes/web.php'));
46 638
    }
47
48 638
    protected function mapUserRoutes()
49
    {
50 638
        Route::middleware('web')
51 638
                ->namespace($this->namespace)
52 638
                ->group(base_path('routes/user.php'));
53 638
    }
54
55 638
    protected function mapAdminRoutes()
56
    {
57 638
        Route::middleware('web')
58 638
                ->namespace($this->namespace)
59 638
                ->group(base_path('routes/administration.php'));
60 638
    }
61
62 638
    protected function mapCustomerRoutes()
63
    {
64 638
        Route::middleware('web')
65 638
                ->namespace($this->namespace)
66 638
                ->group(base_path('routes/customers.php'));
67 638
    }
68
69 638
    protected function mapTechTipRoutes()
70
    {
71 638
        Route::middleware('web')
72 638
                ->namespace($this->namespace)
73 638
                ->group(base_path('routes/techTips.php'));
74 638
    }
75
76
    /**
77
     * Define the "api" routes for the application.
78
     * These routes are typically stateless.
79
     */
80
    // protected function mapApiRoutes()
81
    // {
82
    //     Route::prefix('api')
83
    //             ->middleware('api')
84
    //             ->namespace($this->namespace)
85
    //             ->group(base_path('routes/api.php'));
86
    // }
87
}
88