1 | <?php |
||
8 | class AdminUserDataTable extends DataTable |
||
9 | { |
||
10 | /** |
||
11 | * Build DataTable class. |
||
12 | * |
||
13 | * @return \Yajra\Datatables\Engines\BaseEngine |
||
14 | */ |
||
15 | public function dataTable() |
||
25 | |||
26 | /** |
||
27 | * Get the query object to be processed by dataTables. |
||
28 | * |
||
29 | * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection |
||
30 | */ |
||
31 | public function query() |
||
37 | |||
38 | /** |
||
39 | * Optional method if you want to use html builder. |
||
40 | * |
||
41 | * @return \Yajra\Datatables\Html\Builder |
||
42 | */ |
||
43 | public function html() |
||
49 | |||
50 | /** |
||
51 | * Get columns. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | protected function getColumns() |
||
66 | |||
67 | /** |
||
68 | * Get the default builder parameters. |
||
69 | * |
||
70 | * @return array |
||
71 | */ |
||
72 | protected function getBuilderParameters() |
||
78 | } |
||
79 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: