Arjay Angeles

Results 436 comments of Arjay Angeles

Yes, here's a quick example: ```php // ModelDataTables html() { return $this->builder() ->setTableId('users-table') ->columns($this->getColumns()) ->ajaxWithForm(route('users.index'), '#users-table-form') // use this to automatically append the form data in request } query() {...

Here's an older [docs](https://datatables.yajrabox.com/fluent/custom-filter) but the concept should be the same.

I suggest you enable `APP_DEBUG=true`, inspect the network request and review the `queries` used/generated. You can then review which query is slow and needs optimization.

I think what you need is the `withQuery` api. See https://yajrabox.com/docs/laravel-datatables/master/response-with#query-closure for ref.

Use editColumn instead of addColumn. ```php ->editColumn('status', function($row) { return view('admin.audios.partials.statuses', compact('row'))->render(); }) ```

Some guidelines I guess to help you on what API to use. 1. Use [editColumn](https://yajrabox.com/docs/laravel-datatables/master/edit-column) if the column exists in the DB and you want to add some decoration and...

@js-limitless-factor I think you just need to do the calculation at SQL level and sorting would work: ```php ->addSelectRaw('value1 / value2 as total_amount`) ````

Please provide more details or some snippets to reproduce the issue. For more info, see this example docs: https://datatables.yajrabox.com/eloquent/relationships

I think you don't need to use apply scopes on the latest version. Just return the data from query. ```php return $allLists->getData(); ```

Can you try `datatables->collection($query)` without the scopes. Might be an issue in the factory as it was detected as a query.