ShowPage::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
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 ShowPage extends Component
9
{
10
    public $name;
11
12
    public $route;
13
14
    public $model;
15
16
    /**
17
     * Create a new component instance.
18
     *
19
     * @return void
20
     */
21
    public function __construct($name, $route, $model)
22
    {
23
        $this->name = Str::ucfirst($name);
24
        $this->route = $route ?? Str::plural(str_replace(' ', '_', $name));
25
        $this->model = $model;
26
    }
27
28
    /**
29
     * Get the view / contents that represent the component.
30
     *
31
     * @return \Illuminate\Contracts\View\View|\Closure|string
32
     */
33
    public function render()
34
    {
35
        return view('adminetic::components.show-page');
36
    }
37
}
38