Completed
Push — master ( fe5de4...fdb071 )
by ARCANEDEV
11s
created

FootersRoutes   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 96.3%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 51
ccs 26
cts 27
cp 0.963
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 24
    public static function bindings()
23
    {
24 24
        $registrar = new static;
25
26 16
        $registrar->bind('seo_footer', function ($id) {
27
            return Footer::query()->findOrFail($id);
28 24
        });
29 24
    }
30
31
    /**
32
     * Define the routes for the application.
33
     */
34 8
    public function map()
35
    {
36 16
        $this->prefix('footers')->name('footers.')->group(function () {
37 24
            $this->get('/', 'FootersController@index')
38 24
                 ->name('index'); // admin::seo.footers.index
39
40 24
            $this->get('create', 'FootersController@create')
41 24
                 ->name('create'); // admin::seo.footers.create
42
43 24
            $this->post('store', 'FootersController@store')
44 24
                 ->name('store'); // admin::seo.footers.store
45
46 24
            $this->prefix('{seo_footer}')->group(function () {
47 24
                $this->get('/', 'FootersController@show')
48 24
                     ->name('show'); // admin::seo.footers.show
49
50 24
                $this->get('edit', 'FootersController@edit')
51 24
                     ->name('edit'); // admin::seo.footers.edit
52
53 24
                $this->put('update', 'FootersController@update')
54 24
                     ->name('update'); // admin::seo.footers.update
55
56 24
                $this->delete('delete', 'FootersController@delete')
57 24
                     ->middleware('ajax')
58 24
                     ->name('delete'); // admin::seo.footers.delete
59 24
            });
60 8
        });
61 8
    }
62
}
63