title: Saving a datepicker value to database in laravel
body: <p>I have this input in my form... I need to store the date picked from it, but I get a null value when I submit</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
     $(function() {
         $( "#datepicker" ).datepicker();
     });
  &lt;/script&gt;
  
  &lt;input type="text" required="" placeholder="When are You Coming Back" name="datepicker2"  id="datepicker2" value="" name="datepicker2" class="txt"&gt;
  </code></pre>
  
  <p>am I missing something?? when I submit I don't get any values in the database, I am using <code>laravel5</code></p>
  
  <pre><code>class LeaveController extends Controller
  {
       public function ApplyLeave(Request $request)
      {
  
          Auth::user()-&gt;sent()-&gt;create([
              'tel'       =&gt; $request-&gt;tel,
              'email'    =&gt; $request-&gt;email,
              'start' =&gt; $request-&gt;datepicker,
              'end'       =&gt; $request-&gt;datepicker1,
              'supervisor'    =&gt; $request-&gt;supervisor,
              'department' =&gt; $request-&gt;department,
              'name'    =&gt; $request-&gt;name,
              'adress' =&gt; $request-&gt;adress,
          ]);   
          return view('home');
     }
  </code></pre>