Completed
Push — master ( 9b3fc3...96b827 )
by ARCANEDEV
06:21
created

MetasController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 41
ccs 0
cts 20
cp 0
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A index() 0 9 1
A show() 0 9 1
1
<?php namespace Arcanesoft\Seo\Http\Controllers\Admin;
2
3
use Arcanesoft\Seo\Models\Meta;
4
5
/**
6
 * Class     MetasController
7
 *
8
 * @package  Arcanesoft\Seo\Http\Controllers\Admin
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class MetasController extends Controller
12
{
13
    /* -----------------------------------------------------------------
14
     |  Constructor
15
     | -----------------------------------------------------------------
16
     */
17
    /**
18
     * MetasController constructor.
19
     */
20
    public function __construct()
21
    {
22
        parent::__construct();
23
24
        $this->setCurrentPage('seo-metas');
25
        $this->addBreadcrumbRoute('Metas', 'admin::seo.metas.index');
26
    }
27
28
    /* -----------------------------------------------------------------
29
     |  Main Methods
30
     | -----------------------------------------------------------------
31
     */
32
    public function index()
33
    {
34
        $this->setTitle($title = 'List of Metas');
35
        $this->addBreadcrumb($title);
36
37
        $metas = Meta::paginate(50);
38
39
        return $this->view('admin.metas.index', compact('metas'));
40
    }
41
42
    public function show(Meta $meta)
43
    {
44
        $this->setTitle($title = 'Meta details');
45
        $this->addBreadcrumb($title);
46
47
        $meta->load(['seoable']);
48
49
        return $this->view('admin.metas.show', compact('meta'));
50
    }
51
}
52