Completed
Push — master ( 906f5a...709e36 )
by Phecho
03:29
created

DefaultRoutes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 0 18 1
1
<?php
2
3
/*
4
 * This file is part of Gitamin.
5
 * 
6
 * Copyright (C) 2015-2016 The Gitamin Team
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Gitamin\Http\Routes;
13
14
use Illuminate\Contracts\Routing\Registrar;
15
16
/**
17
 * This is the default routes class.
18
 */
19
class DefaultRoutes
20
{
21
    /**
22
     * Define the default routes.
23
     *
24
     * @param \Illuminate\Contracts\Routing\Registrar $router
25
     */
26
    public function map(Registrar $router)
27
    {
28
        $router->group([
29
            'middleware' => ['app.hasSetting'],
30
            'setting'    => 'app_name',
31
        ], function ($router) {
32
            $router->get('/', [
33
                'as'   => 'index',
34
                'uses' => 'ExploreController@showIndex',
35
            ]);
36
37
            $router->get('issue/{issue}', [
38
                'as'    => 'issue',
39
                'uses'  => 'ExploreController@showIssue',
40
            ]);
41
            
42
        });
43
    }
44
}
45