title: how to compare date / timestamp in laravel while querying the mode?
body: <p>I have a data something like this <code>2014-12-30 09:07:49</code> assigned to created_at.</p>
  
  <p>I have a number, 12 as a parameter value. What I want to do is, I want to compare number, 12 with the above created_at and target to the month. How would I do that.</p>
  
  <p>What I have found is, Laravel automatically convert these created_at to Carbon Object during retrieval of data. Is there a way just to extract month part of created_at during the retrieval?</p>
  
  <pre><code>        public function filterUser($month){
              $user = User::where('created_at', $month)-&gt;get();
          }
  </code></pre>
  
  <p>Obviously, the above code does not work. I found doing <code>CarbonObject-&gt;month</code> would get the month from the timestamp/Carbon object. But how would I implement this idea for my problem.</p>