Action::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 6
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Pratiksh\Adminetic\View\Components;
4
5
use Illuminate\View\Component;
6
7
class Action extends Component
8
{
9
    public $model;
10
11
    public $route;
12
13
    public $show;
14
15
    public $edit;
16
17
    public $delete;
18
19
    public $deleteCondition;
20
21
    /**
22
     * Create a new component instance.
23
     *
24
     * @return void
25
     */
26
    public function __construct($model, $route, $show = true, $edit = true, $delete = true, $deleteCondition = false)
27
    {
28
        $this->model = $model;
29
        $this->route = $route;
30
        $this->show = $show;
31
        $this->edit = $edit;
32
        $this->delete = $delete;
33
        $this->deleteCondition = $deleteCondition;
34
    }
35
36
    /**
37
     * Get the view / contents that represent the component.
38
     *
39
     * @return \Illuminate\Contracts\View\View|\Closure|string
40
     */
41
    public function render()
42
    {
43
        return view('adminetic::components.action');
44
    }
45
}
46