Conditions | 1 |
Paths | 1 |
Total Lines | 36 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 17 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 21 | public function getColumns() |
|
15 | { |
||
16 | $dataset = [ |
||
17 | [ |
||
18 | 21 | 'title' => trans('general.room'), |
|
19 | 'value' => function (Reservation $data) { |
||
20 | 12 | return '<a href="'.route('room.editform', [$data->room->id]).'">'.$data->room->number.'</a>'; |
|
21 | 21 | }, |
|
22 | ], |
||
23 | [ |
||
24 | 21 | 'title' => trans('general.guest'), |
|
25 | 'value' => function (Reservation $data) { |
||
26 | 12 | return '<a href="'.route('guest.editform', [$data->guest->id]).'">'.$data->guest->full_name.'</a>'; |
|
27 | 21 | }, |
|
28 | ], |
||
29 | [ |
||
30 | 21 | 'title' => trans('general.date_start'), |
|
31 | 'value' => function (Reservation $data) { |
||
32 | 12 | return $data->date_start; |
|
33 | 21 | }, |
|
34 | ], |
||
35 | [ |
||
36 | 21 | 'title' => trans('general.date_end'), |
|
37 | 'value' => function (Reservation $data) { |
||
38 | 12 | return $data->date_end; |
|
39 | 21 | }, |
|
40 | ], |
||
41 | [ |
||
42 | 21 | 'title' => trans('general.number_of_people'), |
|
43 | 'value' => function (Reservation $data) { |
||
44 | 12 | return $data->people; |
|
45 | 21 | }, |
|
46 | ], |
||
47 | ]; |
||
48 | |||
49 | 21 | return $dataset; |
|
50 | } |
||
52 |