Hi Sir,
I using last time as your recommended Yajra lib in Laravel to make datatable more flexible ,
In my project I facing issue that I have data that query from many other tables in DB,
so in this case of queries how can using Yajra to query complex data from many table in db,
Where can I put the condition query selected in Model or in Controller!?
When try to add condition in Model with Yajra it's not working
Can you guide me the best way to do that??!
Thanks
Hi,
In the datatable init file, for example;
app/DataTables/Logs/AuditLogsDataTable.php
You can do a more complex query in the query function
public function query(Contact $model)
{
return $model->newQuery()->where("type", 1)->with("statuses");
}