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

Show::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 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