Completed
Push — master ( 6afbe3...49fc1c )
by ARCANEDEV
05:32
created

RouteServiceProvider::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 6
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 6
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
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
    public function map()
22
    {
23
        $this->mapAdminRoutes();
24
    }
25
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Other Functions
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * Map the admin routes.
32
     */
33
    private function mapAdminRoutes()
34
    {
35
        $attributes = $this->getAdminAttributes(
36
            'foundation.',
37
            'Arcanesoft\\Foundation\\Http\\Controllers\\Admin'
38
        );
39
40
        $this->group($attributes, function () {
41
            Routes\Admin\DashboardRoute::register();
42
            Routes\Admin\SettingsRoutes::register();
43
            Routes\Admin\SystemRoutes::register();
44
        });
45
    }
46
}
47