jeudi 26 mai 2016

Retrieved records base on its created_at, yesterday to the start of the current month

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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Wl7WuJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire