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

EditAddButton   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
dl 0
loc 26
rs 10
c 1
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A __construct() 0 5 1
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