1 | <?php |
||
11 | class TenantsDataTable extends AbstractDataTable |
||
12 | { |
||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | */ |
||
16 | protected $model = Tenant::class; |
||
17 | |||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | protected $transformer = TenantTransformer::class; |
||
22 | |||
23 | /** |
||
24 | * Get the query object to be processed by dataTables. |
||
25 | * |
||
26 | * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection |
||
|
|||
27 | */ |
||
28 | public function query() |
||
34 | |||
35 | /** |
||
36 | * Display ajax response. |
||
37 | * |
||
38 | * @return \Illuminate\Http\JsonResponse |
||
39 | */ |
||
40 | public function ajax() |
||
47 | |||
48 | /** |
||
49 | * Get columns. |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | protected function getColumns(): array |
||
70 | } |
||
71 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.