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

FootersRoutes   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 96%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 51
ccs 24
cts 25
cp 0.96
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bindings() 0 8 1
B map() 0 28 1
1
<?php namespace Arcanesoft\Seo\Http\Routes\Admin;
2
3
use Arcanedev\Support\Routing\RouteRegistrar;
4
use Arcanesoft\Seo\Models\Footer;
5
6
/**
7
 * Class     FootersRoutes
8
 *
9
 * @package  Arcanesoft\Seo\Http\Routes\Admin
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class FootersRoutes 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_footer', function ($id) {
27
            return Footer::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('footers')->name('footers.')->group(function () {
37 32
            $this->get('/', 'FootersController@index')
38 32
                 ->name('index'); // admin::seo.footers.index
39
40 32
            $this->get('create', 'FootersController@create')
41 32
                 ->name('create'); // admin::seo.footers.create
42
43 32
            $this->post('store', 'FootersController@store')
44 32
                 ->name('store'); // admin::seo.footers.store
45
46 32
            $this->prefix('{seo_footer}')->group(function () {
47 32
                $this->get('/', 'FootersController@show')
48 32
                     ->name('show'); // admin::seo.footers.show
49
50 32
                $this->get('edit', 'FootersController@edit')
51 32
                     ->name('edit'); // admin::seo.footers.edit
52
53 32
                $this->put('update', 'FootersController@update')
54 32
                     ->name('update'); // admin::seo.footers.update
55
56 32
                $this->delete('delete', 'FootersController@delete')
57 32
                     ->middleware('ajax')
58 32
                     ->name('delete'); // admin::seo.footers.delete
59 32
            });
60 32
        });
61 32
    }
62
}
63