title: dates format (or substring??) in laravel 5
body: <p>I have a laravel 5 application where i need to take the month and the year from the input type month. i have stored these attributes in different columns because i have to search records depending on the year.I'm new to laravel and i'm wondering if there is any substring method with delimiters in laravel. i searched in the documentation but no luck. </p>
  
  <p>This is the input where i get the month from:</p>
  
  <pre><code>&lt;input name="month-' + meta.row + '" class="form-control month" type="month" /&gt;
  </code></pre>
  
  <p>The value that is posted from the above input is in the following format:</p>
  
  <pre><code>2015-06
  </code></pre>
  
  <p>And this is the migration file</p>
  
  <pre><code>Schema::create('reports', function(Blueprint $table)
      {
          /*other columns*/
          $table-&gt;integer('month',false,false,'2');
          $table-&gt;integer('year',false,false,'4');
          /*other columns*/
      });
  </code></pre>
  
  <p>Also i am not sure if the above syntax is correct. I tried to put the int fixed size at the end. I'm using sql server with it.</p>
  
  <p>Any help would really be appreciated, even if it's just a hint.</p>