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
Introducing the all-new https://www.certsdone.com/ACA-Business-cert-exam.html exam [2023] – your gateway to success in the dynamic world of accounting and finance! We've taken your feedback and evolved the exam to align with the latest industry trends and regulations.
Get ready to tackle fresh challenges and showcase your expertise with updated questions that reflect the ever-changing landscape of business and accounting. Our carefully curated question bank ensures you're well-prepared to excel in your ACA-Business exam, setting you on the path to professional excellence.
Hi,
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)
{
return $model->newQuery()->with("statuses");
}
Hi Sir,
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
https://ibb.co/NLn5swg
How you help
Thank you much
Hi M.Fakira
The datatable handles in client-side and it should be fast. The slowness issue is your backend server (API).
As we can see here, you are using remote pagination. For each API request for 10 records, it takes around 1 second or more.
<img src="https://i.ibb.co/F7Wgx2N/image.png" alt="image" border="0">
Thanks
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.
Example:
Users::select("name", "phone", "username")
public function scopeDatatable($query)
{
return $query->select("id", "status", "tractor_id", "year", "make", "model", "owned_by", "last_inspection_date");
}
Thanks for your help and replay ,
I try again to reusing the yajra it's working fast
http://laravel-test.mim4soft.com/public/students
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
Great Eric. Thank you for your big help!
Hi,
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.
https://preview.keenthemes.com/metronic8/laravel/documentation/general/datatables/overview
For more information about the library, you can check it here.
https://github.com/yajra/laravel-datatables
Thanks
Hi,
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
http://laravel-test.mim4soft.com/public/
I hope you check and feedback with which issue still solved to be very fast loading data
Regards,
M.Fakira