I need to get all the documents where updated_at is the same date a today or yesterday, how can I do that?
This is my current code:
$yesterday = new DateTime('-1 days');
$yesterday = $fecha->format('Y-m-d');
$yesterday = new MongoDate(strtotime($yesterday.'00:00:00'));
$date=CampaignLog::where('campaign_id',$id)->where('updated_at','=', $yesterday)->get(array('data'));
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire