Completed
Push — master ( 4d5a46...0c8810 )
by ARCANEDEV
09:08
created

PostsRoutes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

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