title: Laravel 5 on failed request return back with model data
body: <p><strong>EDIT</strong><br>
  This issue has been solved, but I don't understand why the answer worked.<br>
  I would like to know why it didnt work.
  Is there some one who could explain me?</p>
  
  <hr>
  
  <p><strong>Original question</strong><br>
  I am stuck on my settings form, my problem is that at the settings form you can enter some email settings but you can also change your password.</p>
  
  <p>The email settings and password reset works and my form fills it self with the data of the current user. <strong>But</strong> when the form validation fails it redirecteds me back to the form without the form data.</p>
  
  <p>I am not sure if I made myself clear, but this code below will explain it.  </p>
  
  <p><strong>ChangeUserSettingRequest.php</strong></p>
  
  <pre><code>class ChangeUserSettingsRequest extends Request {
  
      /**
       * Determine if the user is authorized to make this request.
       *
       * @return bool
       */
      public function authorize()
      {
          if (\Auth::check()) {
              return true;
          }
          return false;
      }
  
      /**
       * Get the validation rules that apply to the request.
       *
       * WHEN THIS VALIDATION FAILS IT GOES BACK TO SETTINGS.BLADE.PHP 
       * BUT IT DOES NOT KEEP THE SETTINGS DATA IN THE FORM
       */
      public function rules()
      {
          return [
              'current_password' =&gt; 'sometimes|required_with:password',
              'password' =&gt; 'required_with:current_password|min:8|confirmed',
              'password_confirmation' =&gt; 'required_with:password',
          ];
      }
  
  }
  </code></pre>
  
  <p><strong>settings.blade.php</strong></p>
  
  <pre><code>{!! Form::model($settings, array('url' =&gt; route('store.settings'), 'class' =&gt; 'col s12')) !!}
  
      &lt;p&gt;@lang('forms.info.settings')&lt;/p&gt;
  
      &lt;div class="input-field col s12 m6 l6"&gt;
          {!! Form::checkbox('info_mail', 0, false, ['id' =&gt; 'info_mail']) !!}
          {!! Form::label('info_mail', Lang::get('forms.newsletter'), ['for' =&gt; 'info_mail']) !!}
      &lt;/div&gt;
      &lt;div class="input-field col s12 m6 l6"&gt;
          {!! Form::checkbox('message_notification', 0, false, ['id' =&gt; 'message_notification']) !!}
          {!! Form::label('message_notification', Lang::get('forms.messages'), ['for' =&gt; 'message_notification']) !!}
      &lt;/div&gt;
      &lt;div class="input-field col s12 m6 l6"&gt;
          {!! Form::checkbox('friend_notification', 0, false, ['id' =&gt; 'friend_notification']) !!}
          {!! Form::label('friend_notification', Lang::get('forms.friendrequest'), ['for' =&gt; 'friend_notification']) !!}
      &lt;/div&gt;
      &lt;div class="input-field col s12 m6 l6"&gt;
          {!! Form::checkbox('item_notification', 0, false, ['id' =&gt; 'item_notification']) !!}
          {!! Form::label('item_notification', Lang::get('forms.reactiononitem'), ['for' =&gt; 'item_notification']) !!}
      &lt;/div&gt;
  
      @if ($settings and $settings-&gt;google_maps !== null)
          &lt;div class="settings-explain"&gt;
              &lt;p class="margin-top-20"&gt;@lang('forms.info.companysettings')&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="input-field col s12 m6 l6"&gt;
              {!! Form::checkbox('type', 0, false, ['id' =&gt; 'type']) !!}
              {!! Form::label('type', Lang::get('forms.companytype'), ['for' =&gt; 'type']) !!}
          &lt;/div&gt;
          &lt;div class="input-field col s12 m6 l6"&gt;
              {!! Form::checkbox('google_maps', 0, false, ['id' =&gt; 'google_maps']) !!}
              {!! Form::label('google_maps', Lang::get('forms.companymap'), ['for' =&gt; 'google_maps']) !!}
          &lt;/div&gt;
      @endif
  
      &lt;div class="settings-explain"&gt;
          &lt;p class="margin-top-20"&gt;@lang('forms.info.changepassword')&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="input-field col s12"&gt;
          {!! Form::label('current_password', $errors-&gt;has('current_password') ? $errors-&gt;first('current_password') : Lang::get('forms.currentpassword'), ['for' =&gt; 'current_password']) !!}
          {!! Form::password('current_password', ['class' =&gt; $errors-&gt;has('current_password') ? 'invalid' : '']) !!}
      &lt;/div&gt;
      &lt;div class="input-field col s12"&gt;
          {!! Form::label('password', $errors-&gt;has('password') ? $errors-&gt;first('password') : Lang::get('forms.newpassword'), ['for' =&gt; 'password']) !!}
          {!! Form::password('password', ['class' =&gt; $errors-&gt;has('password') ? 'invalid' : '']) !!}
      &lt;/div&gt;  
      &lt;div class="input-field col s12"&gt;
          {!! Form::label('password_confirmation', $errors-&gt;has('password_confirmation') ? $errors-&gt;first('password_confirmation') : Lang::get('forms.repeatpassword'), ['for' =&gt; 'password_confirmation']) !!}
          {!! Form::password('password_confirmation', ['class' =&gt; $errors-&gt;has('password_confirmation') ? 'invalid' : '']) !!}
      &lt;/div&gt;
      &lt;div class="input-field col s12"&gt;
          {!! Form::button(Lang::get('forms.save'), ['class' =&gt; 'btn waves-effect waves-light', 'type' =&gt; 'submit', 'name' =&gt; 'Save']) !!}
      &lt;/div&gt;
  {!! Form::close() !!}
  </code></pre>
  
  <p><strong>UserInfoController.php</strong></p>
  
  <pre><code>/**
   *  Function shows the settings form
   */
  public function showSettings() 
  {
      $title = Lang::get('titles.settings');
      $user_id = Auth::User()-&gt;id;
  
      $settings = $this-&gt;settings-&gt;getUserSettings($user_id);
      $companySettings = $this-&gt;companySettings-&gt;getSettings($user_id);
  
      if ($companySettings) {
          $settings-&gt;type = $companySettings-&gt;type;
          $settings-&gt;google_maps = $companySettings-&gt;google_maps;
      }
  
      return view('pages.users.settings', ['title' =&gt; $title])-&gt;with(compact('settings'));
  }
  
  /**
   *  Function stores the setting changes
   *
   *  ChangeUserSettingsRequest makes sure that the request is valid
   */
  public function storeSettings(ChangeUserSettingsRequest $request)
  {
      $id = Auth::User()-&gt;id;
      $success = $this-&gt;settings-&gt;handleStoreSettingsRequest($request);
  
      // Checks if user has company settings
      $hasCompanySettings = $this-&gt;companySettings-&gt;checkForSettings($id);
  
      // If user has company settings
      if ($hasCompanySettings === true) {
          // Update company settings
          $this-&gt;companySettings-&gt;updateSettings($request);
      }
  
      if ($success === true) {
  
          /* Get translated message */
          $message = Lang::get('toast.settingsstored');
          return Redirect::route('user.profile', array(Auth::User()-&gt;permalink))-&gt;withMessage($message);
      }
  
      $settings = $this-&gt;settings-&gt;getUserSettings($id);
  
      /* Get translated message */
      $message = Lang::get('forms.error.wrongpassword');
  
      /* This works and the form is filled with the correct data after it  redirects me back */
      return Redirect::back()-&gt;withErrors(array('current_password' =&gt; $message))-&gt;withSettings($settings);
  }
  </code></pre>
  
  <p><strong>Request.php</strong>
       
  
  <pre><code>use Illuminate\Foundation\Http\FormRequest;
  abstract class Request extends FormRequest {
  
      //
  
  }
  </code></pre>
  
  <p>So my problem is that in my <strong>UserInfoController</strong> I redirect back and it has the good data but when my <strong>ChangeUserSettingsRequest</strong> redirects me back the form is empty.</p>
  
  <p>Does anyone know why ChangeUserSettingsRequest does not send the data back?  </p>
  
  <ul>
  <li>I am not talking about the password data but about the email settings.  </li>
  <li>I do not want to make a costum validator as I think this should be posible.</li>
  </ul>
  
  <p><strong>Please note: when the validation fails, the function <code>storeSettings</code> will not be executed at all</strong></p>