DashboardController.php
public function searchViewTrxHarian(Request $request) {
$data1 = date("Y-m-d", strtotime($request->start_date));
$data2 = date("Y-m-d", strtotime($request->expire_date));
$trxharianPromo = TrxHarianModel::where(date("Y-m-d",'paydate'), '>', $data1)
->where(date("Y-m-d",'paydate'), '<', $data2)
->get();
return view('pages.dashboard.dashboardTrxHarian')
->with('list', $Report)
->with('date1', $data1)
->with('date2', $data2);
}
Hello,
I think I am getting error when converting the paydate into date only since paydate is date and time.
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause' (SQL: select * from tb_r_solusiorder left join tb_m_biller_solusi on tb_r_solusiorder.productid = tb_m_biller_solusi.Productid and tb_r_solusiorder.billerid = tb_m_biller_solusi.Billerid left join tb_m_biller on tb_r_solusiorder.billerid = tb_m_biller.biller_id where > 2018-08-01 and < 2018-08-31)
Any clue how to fix this error message?