Completed
Push — master ( 1087ad...2bc4d2 )
by ARCANEDEV
8s
created

RouteServiceProvider::mapAdminRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 13
ccs 10
cts 10
cp 1
crap 1
rs 9.4285
1
<?php namespace Arcanesoft\Foundation\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Foundation\Http\Routes;
5
6
/**
7
 * Class     RouteServiceProvider
8
 *
9
 * @package  Arcanesoft\Foundation\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class RouteServiceProvider extends ServiceProvider
13
{
14
    /* ------------------------------------------------------------------------------------------------
15
     |  Main Functions
16
     | ------------------------------------------------------------------------------------------------
17
     */
18
    /**
19
     * Define the routes for the application.
20
     */
21 21
    public function map()
22
    {
23 21
        $this->mapAdminRoutes();
24 21
    }
25
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Other Functions
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * Map the admin routes.
32
     */
33 21
    private function mapAdminRoutes()
34
    {
35 21
        $attributes = $this->getAdminAttributes(
36 21
            'foundation.',
37 21
            'Arcanesoft\\Foundation\\Http\\Controllers\\Admin'
38
        );
39
40 21
        $this->group($attributes, function () {
41 21
            Routes\Admin\DashboardRoute::register();
42 21
            Routes\Admin\SettingsRoutes::register();
43 21
            Routes\Admin\SystemRoutes::register();
44 21
        });
45 21
    }
46
}
47