1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Cortex\Statistics\DataTables\Adminarea; |
6
|
|
|
|
7
|
|
|
use Rinvex\Statistics\Models\Request; |
8
|
|
|
use Cortex\Foundation\DataTables\AbstractDataTable; |
9
|
|
|
|
10
|
|
|
class RequestsDataTable extends AbstractDataTable |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* {@inheritdoc} |
14
|
|
|
*/ |
15
|
|
|
protected $model = Request::class; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* {@inheritdoc} |
19
|
|
|
*/ |
20
|
|
|
protected $createButton = false; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Get columns. |
24
|
|
|
* |
25
|
|
|
* @return array |
26
|
|
|
*/ |
27
|
|
|
protected function getColumns(): array |
28
|
|
|
{ |
29
|
|
|
return [ |
30
|
|
|
'user' => ['title' => trans('cortex/statistics::common.user'), 'responsivePriority' => 0], |
31
|
|
|
'session_id' => ['title' => trans('cortex/statistics::common.session_id')], |
32
|
|
|
'status_code' => ['title' => trans('cortex/statistics::common.status_code')], |
33
|
|
|
'method' => ['title' => trans('cortex/statistics::common.method')], |
34
|
|
|
'protocol_version' => ['title' => trans('cortex/statistics::common.protocol_version')], |
35
|
|
|
'referer' => ['title' => trans('cortex/statistics::common.referer')], |
36
|
|
|
'language' => ['title' => trans('cortex/statistics::common.language')], |
37
|
|
|
'is_no_cache' => ['title' => trans('cortex/statistics::common.is_no_cache'), 'visible' => false], |
38
|
|
|
'wants_json' => ['title' => trans('cortex/statistics::common.wants_json'), 'visible' => false], |
39
|
|
|
'is_secure' => ['title' => trans('cortex/statistics::common.is_secure'), 'visible' => false], |
40
|
|
|
'is_json' => ['title' => trans('cortex/statistics::common.is_json'), 'visible' => false], |
41
|
|
|
'is_ajax' => ['title' => trans('cortex/statistics::common.is_ajax'), 'visible' => false], |
42
|
|
|
'is_pjax' => ['title' => trans('cortex/statistics::common.is_pjax'), 'visible' => false], |
43
|
|
|
'created_at' => ['title' => trans('cortex/statistics::common.created_at'), 'render' => "moment(data).format('MMM Do, YYYY')"], |
|
|
|
|
44
|
|
|
]; |
45
|
|
|
} |
46
|
|
|
} |
47
|
|
|
|
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.