I have a query in SQL Ansi:
select * from payments as P, receipts as R
where P.created_at < CURRENT_DATE AND P.updated_at < CURRENT_DATE AND R.created_at < CURRENT_DATE AND R.updated_at < CURRENT_DATE
Precious to perform the same query in laravel:
public function relatorioBI(){
//1 A pagar
$query = $this->newQuery();
$query->where('created_at','1');
return $this->doQuery($query, $take, $paginate);
}
I need to perform the query in both tables, and test the conditional value!