title: How to use type DATE with laravel php
body: <p>I'm very new using Laravel and I have a problem with a column that I created in the migrations. I have a column that is type date. My problem is that I don't know how can I manage it, how do I have to store some data for a form, etc.</p>
  
  <p>I was asking if someone could tell me, in a method of a controller with the parameter Resquest $r, how can a convert the string from that form in a variable of date. I've been searching and I can't find anything that could help me. Thanks in advance!</p>
  
  <p>Edit:</p>
  
  <p>This is one method of my controller:</p>
  
  <pre><code>public function addObjectives(Request $r,$id){
  
      $gobjectives = Mgobjective::all();
      $sobjectives = Msobjective::all();
  
      $mprogram = Mprogram::find($id);
      $a = Area::find($mprogram-&gt;marea_id);
  
      if($a==null){
          $area = new Area();
          $area-&gt;id = $mprogram-&gt;marea_id;
          $area-&gt;saveArea();
      }
  
      $p = Program::find($id);
  
      if($p==null){
          $program = new Program();
          $program-&gt;id = $id;
          $program-&gt;initialDate= "";
          $program-&gt;finalDate= "";
          $program-&gt;frequency= "";
          $program-&gt;area_id = $mprogram-&gt;marea_id;
          $program-&gt;saveProgram();
      }
  }
  </code></pre>
  
  <p>In initialDate y finalDate de program, I have an empty string because before it was a string. I would like to put there a date that doesn't have to be the actual date.</p>