Closed JintoAntony closed 4 years ago
I have it working with pagination in a few different laravel 7 apps. Can you share some of your code? Maybe that will help get your issue resolved.
On Tue, Aug 18, 2020, 1:49 PM Jinto Antony notifications@github.com wrote:
Is this will work with Laravel 7, pagination? I tried many methods. But, the format of the data is different from API against the example from the website.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jamesdordoy/laravel-vue-datatable/issues/92, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHJ6SHDDY2QMEFCK2PDEALSBK5KRANCNFSM4QD3BMAA .
Laravel Code : $searchValue = $request->input('search'); $orderBy = $request->input('column','id'); $orderBydir = $request->input("dir",'asc'); $length = $request->input('length',10); $data = \DB::table('users') ->select( 'users.id', 'users.name', 'users.email' ) ->orderBy($orderBy, $orderBydir) ->paginate($length)->toArray(); return new DataTableCollectionResource($data);
Vue Code :
Hi, The above codes are what I am using right now. The problem is Laravel return data, in a different format compared to your example. And, sorting, pagination and search is not working. Any idea?
Hi @JintoAntony,
I have the package currently working with Laravel 8.0.
Would you mind adding some console log examples, screenshots or error messages and i can try to help with the issue.
James
Closing due to inactivity
Is this will work with Laravel 7, pagination? I tried many methods. But, the format of the data is different from API against the example from the website.