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,
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