Completed
Push — master ( 138eb0...99e1cf )
by ARCANEDEV
10s
created

RouteServiceProvider::mapAdminRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 1

Importance

Changes 4
Bugs 0 Features 0
Metric Value
c 4
b 0
f 0
dl 0
loc 13
ccs 11
cts 11
cp 1
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
crap 1
1
<?php namespace Arcanesoft\Auth\Providers;
2
3
use Arcanesoft\Auth\Http\Routes;
4
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
5
6
/**
7
 * Class     RouteServiceProvider
8
 *
9
 * @package  Arcanesoft\Auth\Providers
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class RouteServiceProvider extends ServiceProvider
13
{
14
    /* -----------------------------------------------------------------
15
     |  Properties
16
     | -----------------------------------------------------------------
17
     */
18
    protected $adminNamespace = 'Arcanesoft\\Auth\\Http\\Controllers\\Admin';
19
20
    /* -----------------------------------------------------------------
21
     |  Main Methods
22
     | -----------------------------------------------------------------
23
     */
24
    /**
25
     * Define the routes for the application.
26
     */
27 12
    public function map()
28
    {
29
        // Admin Routes
30
        $this->adminGroup(function () {
31
            $this->name('auth.')->group(function () {
32 12
                $this->mapAdminRoutes();
33 12
            });
34 12
        });
35 12
    }
36
37
    /**
38
     * Define the foundation routes for the application.
39
     */
40 12
    private function mapAdminRoutes()
41
    {
42 12
        Routes\Admin\ProfileRoutes::register();
43
44 12
        $this->prefix($this->config()->get('arcanesoft.auth.route.prefix', 'authorization'))
45 12
            ->group(function () {
46 12
                Routes\Admin\StatsRoutes::register();
47 12
                Routes\Admin\UsersRoutes::register();
48 12
                Routes\Admin\RolesRoutes::register();
49 12
                Routes\Admin\PermissionsRoutes::register();
50 12
                Routes\Admin\PasswordResetsRoutes::register();
51 12
            });
52 12
    }
53
}
54