Arjay Angeles
Arjay Angeles
Depends on you use case. What do you want to achieve? See https://yajrabox.com/docs/laravel-datatables/master/quick-starter for quick start.
Your code looks fine. However, it seems like your version may not be updated? `Datatables.php` is for v6.0 below afaik? Please double check that you have the correct version?
@painter10 base on error log line 51, the new `datatables.php` config might not be overwritten. Maybe try deleting the config manually then publish again. ```php $builders = config('datatables.builders'); ... foreach...
I think the issue here is that the actual relationship is hasMany and not hasOne. The package tries to generate a join statement based on your relationship. Given that orders...
@robyfirnandoyusuf @tdrabikdev sorry for late response. You can use [orderColumn](https://yajrabox.com/docs/laravel-datatables/10.0/order-column#main-content) or use a concat sql for full name. ```php ->addSelectRaw("CONCAT(first_name,' ',last_name) as fullname") ``` Or another way is via column.name...
Not sure but I guess you may have some long / text data that is being loaded from the DB? If that is the case, I suggest you select the...
Get / Post? DataTables response would depend on your routes. Use `Route::any()` if you want to support both. ```php $data = product::query(); // Use query, get() is collection. return Datatables::of($data)...
Then I suspect that you are not sending the data properly to server. Inspect your ajax request and double check. See official docs https://datatables.net/examples/server_side/custom_vars.html for more info.
Can you please enable APP_DEBUG=true and then dump the full json response? I suspect that the parameters might not be being sent / parsed properly.
DT_RowIndex is not searchable / orderable too ``` { data: 'DT_RowIndex', name: 'DT_RowIndex', orderable: false, searchable: false } ```