title: Update user on the same page laravel 5
body: <p>I am new to the framework and I have a question.
  I made a login authentication to access and when I go to my profile page I can view my data and change all on the same page.
  I need to go get my ID to be able to do the update or not needed?
  What do I need to do?
  The way I'm doing okay? I only need to create a route::post?</p>
  
  <p><strong>my profile page:</strong></p>
  
  <pre><code>@if(Session::has('message'))
      &lt;div class="alert alert-danger"&gt;
      &lt;h5&gt;{{ Session::get('message') }}&lt;/h5&gt;
      &lt;/div&gt;
  @endif
  
  {!! Form::open(array('url' =&gt; 'backend/perfil', 'name' =&gt; 'updateProfile', 'role' =&gt; 'form'))!!}
  
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('name', 'Utilizador', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::text('name', null, ['class' =&gt; 'form-control input-md', 'placeholder' =&gt; 'Utilizador']) !!}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('nascimento', 'Data de nascimento', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::date('nascimento', null, ['class' =&gt; 'form-control input-md']) !!}
          {{ $errors-&gt;first('nascimento', '&lt;span class=error&gt;:message&lt;/span&gt;') }}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('sexo', 'Sexo', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::select('sexo', ['Masculino', 'Feminino'], null, ['class' =&gt; 'form-control input-md']) !!}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('email', 'Email', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::text('email', null, ['class' =&gt; 'form-control input-md', 'placeholder' =&gt; 'Email']) !!}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('password', 'Password', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::password('password', ['class' =&gt; 'form-control input-md', 'placeholder' =&gt; 'Password']) !!}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('rpassword', 'Confirmar password', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::password('rpassword', ['class' =&gt; 'form-control input-md', 'placeholder' =&gt; 'Confirmar password']) !!}
      &lt;/div&gt;
  &lt;/div&gt;                          
  &lt;div class="row" style="margin-bottom: 20px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-2 col-lg-2"&gt;
          {!! Form::label('imagem', 'Imagem', ['class' =&gt; 'label_perfil']) !!}
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5"&gt;
          {!! Form::file('imagem', ['class' =&gt; 'input-file']) !!}
      &lt;/div&gt;
  &lt;/div&gt;   
  &lt;div class="row" style="margin-bottom: 20px; margin-top: 30px;"&gt;
      &lt;div class="col-md-3 col-lg-3"&gt;&lt;/div&gt;
      &lt;div class="col-md-9 col-lg-9"&gt;
          {!! Form::submit('Enviar', ['class' =&gt; 'btn btn-primary']) !!}
      &lt;/div&gt;
  &lt;/div&gt; 
  {!! Form::close() !!}
  </code></pre>
  
  <p><strong>My controller:</strong></p>
  
  <pre><code>public function perfil() {
      return view('backend/perfil.index');        
  }           
  
  public function updateProfile() {
  
      $profileData = Input::except('_token');
      $validation = Validator::make($profileData, User::$profileData);
      if ($validation-&gt;passes()) {
          User::where('id', Input::get('id'))-&gt;update($profileData);
          return view('backend/perfil.index')-&gt;with('message', 'Updated Succesfully');
      } else {
          return view('backend/perfil.index')-&gt;with('message', $validation-&gt;messages());
      }
  }
  </code></pre>
  
  <p><strong>My route:</strong> </p>
  
  <pre><code>Route::get('backend/perfil','BackendControlador@perfil');
  Route::post('backend/perfil', 'BackendControlador@updateProfile');
  </code></pre>
  
  <p><strong>My app User:</strong> </p>
  
  <pre><code>public static $profileData = array(
          'email' =&gt;  'required|email',
          'name' =&gt;  'required',
          );
  </code></pre>