title: Laravel form :: date function format
body: <p>I need your help with something.
  I cant find to work this one out. 
  I think it should be really simple, but it has kept me busy for hours. </p>
  
  <pre><code>{{Form::date('age', $data[0]-&gt;age)}}  
  </code></pre>
  
  <p>When I use the form::date function I let a user select a birthday.
  After selecting the information is saved to a database in the following format ("Y-m-d"), this works perfectly. </p>
  
  <p>If the user wants to edit the date of birth, it shows it as ("d-m-Y"), how can I show this as ("Y-m-d")? I have been searching online for hours, have tried it with carbon, with date_format and a lot more, nothing seems to work.</p>
  
  <p>What am I doing wrong here? 
  I am using laravel 5.2</p>
  
  <p>Thank you for the help.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The query to get the information from the Mysql panel:</p>
  
  <pre><code>$userId = auth()-&gt;user()-&gt;id; 
  $data = Setting::where('user_id', '=', $userId)-&gt;first(); 
  return view('pages_user.mysettings')-&gt;with('data', $data); 
  </code></pre>
  
  <p>The model:</p>
  
  <pre><code>protected $dates = ['age'];
  protected $table = 'date_userinfo';
  </code></pre>
  
  <p>The input box</p>
  
  <pre><code>{{ Form::date('age', $data-&gt;age-&gt;format('Y-m-d')) }} 
  </code></pre>