big datatable data
can please give example how can fetch big data table with laravel server fast and smooth...
as i check i didn't find source code example,
can pls help
Our Laravel Datatable uses the library name
yajra/laravel-datatables. By right, fetching big data is supported.
Please check the documentation to create the datatable.
For more information about the library, you can check it here.
Thank for your help,
I try to using your recommend library with laravel but I see still have some loading time
can you pls check my example I created using your library yajra
I hope you check and feedback with which issue still solved to be very fast loading data
Can you please more clarify what is my mistake the be loading slow!
Laravel actually using paginator, so what is can benefit from jquery ajax load, which difference ??
Maybe, I can assist the difference between this and laravel paginate is that you are rendering the data on the server instead of the client. And personally Yajra is a lot better as it has many benefits that laravel paginating simply does not have. You can write very complex code and pass that information into the datatable.
Usually, when you are doing Users::all() that causes a lot of slowness on the page load because the server is trying to run that big of a query. My recommendation would be to only select the columns in the Datatable that you need.
Users::select('name', 'phone', 'username')
This will drastically reduce the load time of data.
This is just my personal preference ,but instead of storing the query inside of the controller itself. You can actually make it a scope inside of your model.
public function scopeDatatable($query)
return $query->select('id', 'status', 'tractor_id', 'year', 'make', 'model', 'owned_by', 'last_inspection_date');
Hope this helps!
Thanks for your help and replay ,
I try again to reusing the yajra it's working fast
The important thing with me how can using this library with complex queries with laravel , for example if I want to get student data from multi table with some special combine conditions query ,
Can pls help how do this with Yajra , can you also give me source link can help!
A lot of Regards, Thanks
In the datatable initialize controller, usually inside app/DataTables. There is a function query(), you can do a more complex query from the Model using Laravel Eloquent.
public function query(Model $model)
I have some issues need to help
1- Can Yajra working with Laravel 5.2
2-How can combined your theme Metronic 8 with Yajra without lose your theme style and all functionality , Because when I install Yajra in my project the many functionality is lose and not working perfectly ..!
3-Your package theme have laravel folder, so how can I us it , and can I using Laravel from command , but not have idea how install you theme in it.
4-Could you please check my system that is using with your Theme https://tsawadnotjson.mim4soft.com/user/login User & pass : superadmin
I using read data from json and load every time 20 record , so when try search in table it's only search inside the 20 recode only not all data
How you help
Thank you much