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

PostsRoutes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0
ccs 0
cts 11
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 0 13 1
1
<?php namespace Arcanesoft\Blog\Http\Routes\Front;
2
3
use Arcanedev\Support\Routing\RouteRegistrar;
4
5
/**
6
 * Class     PostsRoutes
7
 *
8
 * @package  Arcanesoft\Blog\Http\Routes\Front
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class PostsRoutes extends RouteRegistrar
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Main Functions
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Map routes.
19
     */
20
    public function map()
21
    {
22
        $this->prefix('posts')->name('posts.')->group(function () {
23
            $this->get('/', 'PostsController@index')
24
                 ->name('index');   // public::blog.posts.index
25
26
            $this->get('{slug}', 'PostsController@show')
27
                 ->name('show');    // public::blog.posts.show
28
29
            $this->get('{year}', 'PostsController@archive')
30
                 ->name('archive'); // public::blog.posts.archive
31
        });
32
    }
33
}
34