1$data = DB::table('borrowers')
2 ->join('loans', 'borrowers.id', '=', 'loans.borrower_id')
3 ->select('borrowers.*', 'loans.*')
4 ->where('loan_officers', 'like', '%' . $officerId . '%')
5 ->where('loans.maturity_date', '<', date("Y-m-d"))
6 ->get();
7