Completed
Push — master ( 71431a...b18049 )
by ARCANEDEV
04:47
created

RouteServiceProvider::getRouteNamespace()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Foundation\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Foundation\Http\Routes;
5
use Illuminate\Contracts\Routing\Registrar as Router;
6
7
/**
8
 * Class     RouteServiceProvider
9
 *
10
 * @package  Arcanesoft\Foundation\Providers
11
 * @author   ARCANEDEV <[email protected]>
12
 */
13
class RouteServiceProvider extends ServiceProvider
14
{
15
    /* ------------------------------------------------------------------------------------------------
16
     |  Main Functions
17
     | ------------------------------------------------------------------------------------------------
18
     */
19
    /**
20
     * Define the routes for the application.
21
     *
22
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
23
     */
24
    public function map(Router $router)
25
    {
26
        $this->mapAdminRoutes($router);
27
    }
28
29
    /* ------------------------------------------------------------------------------------------------
30
     |  Other Functions
31
     | ------------------------------------------------------------------------------------------------
32
     */
33
    /**
34
     * Map the admin routes.
35
     *
36
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
37
     */
38 12
    private function mapAdminRoutes(Router $router)
39
    {
40 12
        $attributes = array_merge($this->getFoundationRouteGroup(), [
0 ignored issues
show
Deprecated Code introduced by
The method Arcanesoft\Core\Bases\Ro...tFoundationRouteGroup() has been deprecated.

This method has been deprecated.

Loading history...
41 12
            'as'        => 'admin::foundation.',
42
            'namespace' => 'Arcanesoft\\Foundation\\Http\\Controllers\\Admin',
43
        ]);
44
45
        $router->group($attributes, function (Router $router) {
46
            Routes\Admin\DashboardRoute::register($router);
47
            Routes\Admin\SettingsRoutes::register($router);
48
            Routes\Admin\SystemRoutes::register($router);
49
        });
50
    }
51
}
52