I ve got table in data base called invoices and columns automonth and autoyear with values. I don't know why this function returns empty array. I want to get rows with automonth value and autoyear value. Please help me.
$autoyear = date('Y');
$automonth = date('m');
$autonumber = DB::table("invoices as invoices")
->where('automonth', '=', '$automonth')
->where('autoyear', '=', '$autoyear')
->get();