Completed
Push — master ( eebd52...3cd9a5 )
by ARCANEDEV
08:34
created

PostsController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 32
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A index() 0 10 1
1
<?php namespace Arcanesoft\Blog\Http\Controllers\Foundation;
2
3
use Arcanesoft\Blog\Bases\FoundationController;
4
5
/**
6
 * Class     PostsController
7
 *
8
 * @package  Arcanesoft\Blog\Http\Controllers\Foundation
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class PostsController extends FoundationController
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Constructor
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Instantiate the controller.
19
     */
20
    public function __construct()
21
    {
22
        parent::__construct();
23
24
        $this->setCurrentPage('blog-posts');
25
        $this->addBreadcrumbRoute('Posts', 'blog::foundation.posts.index');
26
    }
27
28
    /* ------------------------------------------------------------------------------------------------
29
     |  Main Functions
30
     | ------------------------------------------------------------------------------------------------
31
     */
32
    public function index()
33
    {
34
        $this->authorize('blog.posts.list');
35
36
        $title = 'Blog - Posts';
37
        $this->setTitle($title);
38
        $this->addBreadcrumb('List all posts');
39
40
        return $this->view('foundation.posts.list');
41
    }
42
}
43