Hi,
I'm using Yajra lib with Laravel for datatable,
I want to make popup window as advance search, How can do it with your Metronic Theme
Another thing, how can make advance query from mulit tables in database to show it in on datatable page ,
for example, I have Visa page.. this page get data from multi db table ,
Visa related with (visa_type, customer, branch, sms status , sms counter ) , the sms status is related with ( Sms status, sms message, sms count succes send ..etc) , all this information is shown in on datatable in Visa page...
So, how can using Yajra to manage kind of this detatable query
Hope you guide me
Regards,
In Laravel, the Datatable package allows for advanced search functionality, enabling users to filter records dynamically based on various parameters. By implementing custom queries and AJAX requests, you can improve the search efficiency and speed of your application. For example, when implementing a civil id check kuwait you can easily set up filters for specific data fields to enhance user experience.
I’ve worked with Yajra DataTables in Laravel before, and setting up an advanced search popup in Metronic is totally doable. You can use a modal for the popup and pass the search parameters to your DataTable via AJAX. As for querying multiple tables, you’ll need to use eloquent joins or raw queries in your DataTable query builder to fetch related data efficiently.
It’s kind of like managing Qatar ID Renewal — you need the right documents from multiple sources (residency details, sponsorship info, etc.), and everything must be processed correctly to avoid delays. I found a detailed guide on QatarAlive that simplifies the renewal process. Similarly, structuring your DataTable queries the right way ensures smooth data retrieval without performance issues!
Hi,
The relation needs to be done in the Laravel model. For example in Visa model file,
Visa.php modal file;
public function customer()
{
return $this->belongsTo(User::class, "user_id");
}
public function query(Visa $model)
{
return $model->newQuery()->with("customer");
}
public function dataTable($query)
{
return datatables()
->eloquent($query)
->editColumn("customer", function (Visa $model) {
// access customer data here for columns
// $model->customer
})
//...
Hi,
I try that, But my issue is when I try fetch some data from other tables and some fields still empty not yet have values entered, In Yajra lib show me error and can't get data, also have issue with null data ( can't return null value or treatment with null ), only need all data selected from table is not empty, so how can solving that ??I hope you understand me
Best regards,
M.Fakira
Please refer to my answer here
https://devs.keenthemes.com/question/how-treatment-with-null-value-in-yarja-in-laravel
Thanks