Monday, March 20, 2017

how to get the values of specified date range?

I am trying to retrieve today's values from the table, in my table i have created_at columns, which is a timestamp automatically assigned when a row is inserted. I also have a send_at column where i manually insert datetime, when i query send_at with a range it works, but when i query created_at column i get nothing back.

  $campaigns = SmsCampaign::whereBetween('created_at', array('2017-03-20 12:00:00','2017-03-20 23:59:00'))->paginate(10);

        return view('sms_campaign.smscampaign')->with('campaigns', $campaigns);



via Mikethetechy

Advertisement