Passed
Push — master ( dff497...d8daf2 )
by Churakov
03:17
created

Show   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildUrl() 0 3 1
A render() 0 5 1
1
<?php
2
3
namespace ChurakovMike\EasyGrid\Columns\Actions;
4
5
/**
6
 * Class Show.
7
 * @package ChurakovMike\EasyGrid\Columns\Actions
8
 */
9
class Show extends BaseButton
10
{
11
    /**
12
     * @return array|string
13
     * @throws \Throwable
14
     */
15
    public function render($row)
16
    {
17
        return view('churakovmike_easygrid::actions.show', [
18
            'url' => $this->getUrl($row),
19
        ])->render();
20
    }
21
22
    /**
23
     * Build link to edit page.
24
     *
25
     * @param $row
26
     * @return string
27
     */
28
    public function buildUrl($row)
29
    {
30
        return $this->getCurrentUrl() . '/' . $row->id;
31
    }
32
}
33