Completed
Push — master ( 756eed...5aa9a0 )
by ARCANEDEV
03:52
created

SpammersController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php namespace Arcanesoft\Seo\Http\Controllers\Admin;
2
3
use Arcanedev\SpamBlocker\Contracts\SpamBlocker;
4
5
/**
6
 * Class     SpammersController
7
 *
8
 * @package  Arcanesoft\Seo\Http\Controllers\Admin
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class SpammersController extends Controller
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * The spam blocker instance.
19
     *
20
     * @var \Arcanedev\SpamBlocker\Contracts\SpamBlocker
21
     */
22
    protected $blocker;
23
24
    /* ------------------------------------------------------------------------------------------------
25
     |  Constructor
26
     | ------------------------------------------------------------------------------------------------
27
     */
28
    /**
29
     * MetasController constructor.
30
     */
31
    public function __construct(SpamBlocker $blocker)
32
    {
33
        parent::__construct();
34
35
        $this->blocker = $blocker;
36
37
        $this->setCurrentPage('seo-spammers');
38
        $this->addBreadcrumbRoute('Spammers', 'admin::seo.spammers.index');
39
    }
40
41
    /* ------------------------------------------------------------------------------------------------
42
     |  Main Functions
43
     | ------------------------------------------------------------------------------------------------
44
     */
45
    public function index()
46
    {
47
        $this->setTitle($title = 'List of Spammers');
48
        $this->addBreadcrumb($title);
49
50
        $spammers = $this->blocker->all();
51
52
        return $this->view('admin.spammers.index', compact('spammers'));
53
    }
54
}
55