Completed
Push — master ( 7328ed...c4af57 )
by ARCANEDEV
04:44
created

RouteServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 9

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 0 Features 0
Metric Value
wmc 3
lcom 1
cbo 9
dl 0
loc 64
ccs 21
cts 21
cp 1
rs 10
c 6
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 9 1
A mapAdminRoutes() 0 13 1
A registerRouteBindings() 0 6 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
19
    /**
20
     * The admin controller namespace for the application.
21
     *
22
     * @var string
23
     */
24
    protected $adminNamespace = 'Arcanesoft\\Auth\\Http\\Controllers\\Admin';
25
26
    /* -----------------------------------------------------------------
27
     |  Main Methods
28
     | -----------------------------------------------------------------
29
     */
30
31
    /**
32
     * Define the routes for the application.
33
     */
34 12
    public function map()
35
    {
36
        // Admin Routes
37
        $this->adminGroup(function () {
38
            $this->name('auth.')->group(function () {
39 12
                $this->mapAdminRoutes();
40 12
            });
41 12
        });
42 12
    }
43
44
    /* -----------------------------------------------------------------
45
     |  Other Methods
46
     | -----------------------------------------------------------------
47
     */
48
49
    /**
50
     * Define the foundation routes for the application.
51
     */
52 12
    protected function mapAdminRoutes()
53
    {
54 12
        Routes\Admin\ProfileRoutes::register();
55
56 12
        $this->prefix($this->config()->get('arcanesoft.auth.route.prefix', 'authorization'))
57 12
             ->group(function () {
58 12
                 Routes\Admin\StatsRoutes::register();
59 12
                 Routes\Admin\UsersRoutes::register();
60 12
                 Routes\Admin\RolesRoutes::register();
61 12
                 Routes\Admin\PermissionsRoutes::register();
62 12
                 Routes\Admin\PasswordResetsRoutes::register();
63 12
             });
64 12
    }
65
66
    /**
67
     * Register the route bindings.
68
     */
69 12
    protected function registerRouteBindings()
70
    {
71 12
        Routes\Admin\UsersRoutes::bindings();
72 12
        Routes\Admin\RolesRoutes::bindings();
73 12
        Routes\Admin\PermissionsRoutes::bindings();
74 12
    }
75
}
76