title: Laravel 5.4 : Eloquent. Find closest dates
body: <p>I have set of users, which contains Date Of Birth.
  How i can get closest birthdays using Eloquent ORM without pushing native SQL query into it?</p>
  
  <p>I also have tried next piece of code, which doesn't work correctly:</p>
  
  <pre><code>   /**
       * Returns 10 closest birthdays
       *
       * @return \Illuminate\Http\JsonResponse
       */
      public function birthdays()
      {
          $carbon = new Carbon();
          $date = "%-" .
          $carbon-&gt;month &lt; 10 ? "0{$carbon-&gt;month}" : $carbon-&gt;month . "-" .
          $carbon-&gt;day &lt; 10 ? "0{$carbon-&gt;day}" : $carbon-&gt;day . "-";
  
          $birthdays = User::latest('dob')
              -&gt;whereRaw("dob &gt; {$date}")
              -&gt;limit(10)
              -&gt;get();
  
          return $this-&gt;jsonResponse(compact('birthdays'), []);
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/DKmGM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DKmGM.png" alt="Dates in DB"></a></p>
  
  <p>Thanks in advance.</p>