title: How to get the max and min dates in a collection of documents using jenssegers/laravel-mongodb package?
body: <p>I have a collection of documents that look like this:</p>
  
  <pre><code>{
      "_id" : ObjectId("5826182e2e94e0aefc541924"),
      "calls" : [ 
          {
              "call_date" : "2016-08-16 00:00:00.000",
              "updated_at" : ISODate("2016-11-11T19:12:46.905Z"),
              "created_at" : ISODate("2016-11-11T19:12:46.905Z"),
              "_id" : ObjectId("5826182e2e94e0aefc541925")
          }
      ],
          [ 
          {
              "call_date" : "2016-08-19 00:00:00.000",
              "updated_at" : ISODate("2016-11-11T19:12:46.905Z"),
              "created_at" : ISODate("2016-11-11T19:12:46.905Z"),
              "_id" : ObjectId("5826182e2e94f0aefc541925")
          }
      ],
          [ 
          {
              "call_date" : "2016-08-07 00:00:00.000",
              "updated_at" : ISODate("2016-11-11T19:12:46.905Z"),
              "created_at" : ISODate("2016-11-11T19:12:46.905Z"),
              "_id" : ObjectId("5826182e2j94e0aefc541925")
          }
      ]
  
  }
  </code></pre>
  
  <p>I want to be get the minimum and maximum dates across the entire collection. So in the case above, I would like to get 2016-08-07 00:00:00.000 as minimum date and 2016-08-19 00:00:00.000 as the maximum date. I am not sure if I have to use some sort of aggregate function or a regular query. Thanks for your help</p>