Passed
Push — main ( 275957...473697 )
by PRATIK
04:03
created

EditAddButton::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 5
rs 10
c 1
b 1
f 0
1
<?php
2
3
namespace Pratiksh\Adminetic\View\Components;
4
5
use Illuminate\Support\Str;
6
use Illuminate\View\Component;
7
8
class EditAddButton extends Component
9
{
10
    public $model;
11
12
    public $name;
13
14
    /**
15
     * Create a new component instance.
16
     *
17
     * @return void
18
     */
19
    public function __construct($model, $name)
20
    {
21
22
        $this->model = $model;
23
        $this->name = Str::ucfirst($name);
24
    }
25
26
    /**
27
     * Get the view / contents that represent the component.
28
     *
29
     * @return \Illuminate\Contracts\View\View|\Closure|string
30
     */
31
    public function render()
32
    {
33
        return view('adminetic::components.edit.edit-add-button');
34
    }
35
}
36