Completed
Push — master ( 8506a8...f27bf0 )
by Adam
06:27
created

UserTableService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 31
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRouteName() 0 3 1
B getColumns() 0 24 1
1
<?php
2
3
namespace App\Services;
4
5
use App\Models\User;
6
7
class UserTableService implements TableServiceInterface
8
{
9
    public function getRouteName()
10
    {
11
        return 'user';
12
    }
13
14
    public function getColumns()
15
    {
16
        $dataset = [
17
            [
18
                'title' => trans('general.name'),
19
                'value' => function (User $data) {
20
                    return $data->name;
21
                },
22
            ],
23
            [
24
                'title' => trans('auth.email'),
25
                'value' => function (User $data) {
26
                    return $data->email;
27
                },
28
            ],
29
            [
30
                'title' => trans('general.created'),
31
                'value' => function (User $data) {
32
                    return $data->created_at;
33
                },
34
            ],
35
        ];
36
37
        return $dataset;
38
    }
39
}
40