Completed
Push — master ( 872cc5...a1b8a3 )
by ARCANEDEV
10s
created

RouteServiceProvider::mapPublicRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

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