I'm trying to retrieved records base on its 'created_at' timestamp column, where yesterday is the start date and retrieved records until to the start of the current month
$h_msg1 = m_chat_history::where('employee_id',$request->other_id)->whereNull('to_group')->where('to_employee_id',$request->id)->whereBetween('created_at', [
Carbon::parse('yesterday')->startOfDay(),
Carbon::now()->endOfMonth(),
])->get();
But unfortunately it throws me and empty result, any help, ideas, clues, suggestions, recommendations please?