Passed
Pull Request — master (#93)
by Fèvre
10:04 queued 05:10
created

CategoryController::showUpdateForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
nc 1
nop 2
dl 0
loc 15
rs 9.9666
c 1
b 0
f 0
1
<?php
2
namespace Xetaravel\Http\Controllers\Admin\Blog;
3
4
use Illuminate\View\View;
5
use Xetaravel\Http\Controllers\Admin\Controller;
6
7
class CategoryController extends Controller
8
{
9
    /**
10
     * Constructor.
11
     */
12
    public function __construct()
13
    {
14
        parent::__construct();
15
16
        $this->breadcrumbs->addCrumb(
17
            '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-2" fill="none"' .
18
            ' viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" ' .
19
            'stroke-linejoin="round" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2' .
20
            ' 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" /></svg> Blog',
21
            route('admin.blog.article.index')
22
        );
23
    }
24
25
    /**
26
     * Show all categories.
27
     *
28
     * @return \Illuminate\View\View
29
     */
30
    public function index(): View
31
    {
32
        $this->breadcrumbs->addCrumb(
33
            '<i class="fa-solid fa-tags mr-2"></i> Manage Categories',
34
            route('admin.blog.category.index')
35
        );
36
37
        return view('Admin::Blog.category.index', ['breadcrumbs' => $this->breadcrumbs]);
38
    }
39
}
40