Completed
Push — master ( 800114...d023f1 )
by ARCANEDEV
04:49
created

MetasRoutes   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 92.86%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 35
ccs 13
cts 14
cp 0.9286
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bindings() 0 8 1
A map() 0 12 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
     */
22 32
    public static function bindings()
23
    {
24 32
        $registrar = new static;
25
26
        $registrar->bind('seo_meta', function ($id) {
27
            return Meta::findOrFail($id);
28 32
        });
29 32
    }
30
31
    /**
32
     * Define the routes for the application.
33
     */
34 32
    public function map()
35
    {
36
        $this->prefix('metas')->name('metas.')->group(function () {
37 32
            $this->get('/', 'MetasController@index')
38 32
                 ->name('index'); // admin::seo.metas.index
39
40 32
            $this->prefix('{seo_meta}')->group(function () {
41 32
                $this->get('/', 'MetasController@show')
42 32
                     ->name('show'); // admin::seo.metas.show
43 32
            });
44 32
        });
45 32
    }
46
}
47