Completed
Push — master ( 96b827...e9016c )
by ARCANEDEV
15:51
created

MetasRoutes::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 1
1
<?php namespace Arcanesoft\Seo\Http\Routes\Admin;
2
3
use Arcanedev\Support\Routing\RouteRegistrar;
4
use Arcanesoft\Seo\Models\Meta;
5
6
/**
7
 * Class     MetasRoutes
8
 *
9
 * @package  Arcanesoft\Seo\Http\Routes\Admin
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class MetasRoutes extends RouteRegistrar
13
{
14
    /* -----------------------------------------------------------------
15
     |  Main Methods
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * Register the bindings.
21 16
     */
22
    public static function bindings()
23
    {
24
        $registrar = new static;
25 16
26
        $registrar->bind('seo_meta', function ($id) {
27
            return Meta::findOrFail($id);
28 16
        });
29 16
    }
30
31 16
    /**
32 16
     * Define the routes for the application.
33 16
     */
34 16
    public function map()
35 16
    {
36 16
        $this->prefix('metas')->name('metas.')->group(function () {
37
            $this->get('/', 'MetasController@index')
38
                 ->name('index'); // admin::seo.metas.index
39
40
            $this->prefix('{seo_meta}')->group(function () {
41
                $this->get('/', 'MetasController@show')
42
                     ->name('show'); // admin::seo.metas.show
43
            });
44
        });
45
    }
46
}
47