Completed
Pull Request — master (#2)
by ARCANEDEV
15:20
created

RouteServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 38
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 4 1
A mapAdminRoutes() 0 12 1
1
<?php namespace Arcanesoft\Seo\Providers;
2
3
use Arcanesoft\Core\Bases\RouteServiceProvider as ServiceProvider;
4
use Arcanesoft\Seo\Http\Routes;
5
use Illuminate\Contracts\Routing\Registrar as Router;
6
7
/**
8
 * Class     RouteServiceProvider
9
 *
10
 * @package  Arcanesoft\Seo\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
     |  Routes
31
     | ------------------------------------------------------------------------------------------------
32
     */
33
    /**
34
     * Map the admin routes.
35
     *
36
     * @param  \Illuminate\Contracts\Routing\Registrar  $router
37
     */
38
    private function mapAdminRoutes(Router $router)
39
    {
40
        $attributes = $this->getAdminAttributes(
41
            'seo.',
42
            'Arcanesoft\\Seo\\Http\\Controllers\\Admin',
43
            $this->config()->get('arcanesoft.seo.route.prefix', 'seo')
44
        );
45
46
        $router->group($attributes, function ($router) {
47
            Routes\Admin\SeoRoutes::register($router);
48
        });
49
    }
50
}
51