title: In Laravel " return Redirect::back()->withErrors($Validator)->withInput(); " Not Working For me?
body: <p>Here when i fill field with wrong data at time this code give errors but old input not showing. Is there any solution ??</p>
  
  <ul>
  <li>{{ old('name') }} is working but i wanna do with withinput function.</li>
  </ul>
  
  <hr>
  
  <p>My Controller :-</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Userlist;
  use Illuminate\Support\Facades\Redirect;
  use Illuminate\Support\Facades\Validator;
  
  class UserlistController extends Controller
  {
      public function index(){
          return view('Project01.index');
      }
  
      public function store(Request $request){
  
          $Validator = $request-&gt;validate([
              'username' =&gt; 'required|unique:userlists,username|max:20',
              'email' =&gt; 'required|email|unique:userlists,email|max:20',
              'password' =&gt; 'required',
              'bod' =&gt; 'required',
              'comments' =&gt; 'required',
              'Phone_no' =&gt; 'required',
              'gender' =&gt; 'required',
              'agreement' =&gt; 'required',
          ],[
              'username.required' =&gt; 'Please Enter Your Username',
              'email.required' =&gt; 'Please Enter Your Username',
              'password.required' =&gt; 'Please Enter Your Username',
              'bod.required' =&gt; 'Please Enter Your Username',
              'comments.required' =&gt; 'Please Enter Your Username',
              'Phone_no.required' =&gt; 'Please Enter Your Username',
          ]);
  
          if($Validator-&gt;fails()){
              return Redirect::back()-&gt;withErrors($Validator)-&gt;withInput();
          }
  
      }
  
  }
  </code></pre>
  
  <p>Index.blade.php Page</p>
  
  <pre><code>@extends('Structure.main2')
  
  @push('Extra-Header-Links')
      &lt;title&gt;Project Index Page&lt;/title&gt;
  
      &lt;style type="text/css"&gt;
          .error-msg{
              color: red !important;  
          }
      &lt;/style&gt;
  
  @endpush
  
  @section('main-content')
      &lt;div class="container"&gt;
          &lt;div class="col-lg-12 text-center mt-3 mb-3 border-bottom" &gt;
              &lt;h1&gt;Project01 Index&lt;/h1&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="container"&gt;
          &lt;div class="row justify-content-center"&gt;
              &lt;div class="col-lg-8 mb-5"&gt;
              &lt;form method="POST" action="{{ route('store') }}"&gt;
                      @csrf
                      &lt;div class="form-group"&gt;
                          &lt;label for="UserName"&gt;&lt;b&gt;UserName&lt;/b&gt;&lt;/label&gt;
                          &lt;input type="text" name="username" class="form-control" id="UserName" value=""&gt;
                          @error('username')
                              {{ $errors-&gt;first('username') }}
                          @enderror
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="exampleInputEmail1"&gt;&lt;b&gt;Email address&lt;/b&gt;&lt;/label&gt;
                          &lt;input type="email" class="form-control" id="exampleInputEmail1" name="email" &gt;
                          @if($errors-&gt;has('email'))
                              &lt;small class="form-text text-muted error-msg"&gt; {{ $errors-&gt;first('email') }} &lt;/small&gt;
                          @endif
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="exampleInputPassword1"&gt;&lt;b&gt;Password&lt;/b&gt;&lt;/label&gt;
                          &lt;input type="password" class="form-control" id="exampleInputPassword1" name="password"&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="bod"&gt;&lt;b&gt;Birth Of Date&lt;/b&gt;&lt;/label&gt;
                          &lt;input type="date" class="form-control" id="bod" name="bod"&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="comments"&gt;&lt;b&gt;Comments&lt;/b&gt;&lt;/label&gt;
                          &lt;textarea name="comments" class="form-control" id="comments" cols="30" rows="5"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="Phone_no"&gt;&lt;b&gt;Phone No&lt;/b&gt;&lt;/label&gt;
                          &lt;input type="number" class="form-control" name="Phone_no" id="phone_no"&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label &gt;&lt;b&gt;Gender :-  &lt;/b&gt;&lt;/label&gt;
                          &lt;div class="form-check form-check-inline"&gt;
                              &lt;input class="form-check-input" type="radio" name="gender" id="inlineradio1" value="option1" checked&gt;
                              &lt;label class="form-check-label" for="inlineradio1"&gt;Male&lt;/label&gt;
                          &lt;/div&gt;
                          &lt;div class="form-check form-check-inline"&gt;
                              &lt;input class="form-check-input" type="radio" name="gender" id="inlineradio2" value="option2"&gt;
                              &lt;label class="form-check-label" for="inlineradio2"&gt;Female&lt;/label&gt;
                          &lt;/div&gt;
                          &lt;div class="form-check form-check-inline"&gt;
                              &lt;input class="form-check-input" type="radio" name="gender" id="inlineradio3" value="option3"&gt;
                              &lt;label class="form-check-label" for="inlineradio3"&gt;Other&lt;/label&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group form-check"&gt;
                          &lt;input type="checkbox" class="form-check-input" id="exampleCheck1" value="1" name="agreement"&gt;
                          &lt;label class="form-check-label" for="exampleCheck1"&gt;Accept All Conditions&lt;/label&gt;
                      &lt;/div&gt;
                      &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
                  &lt;/form&gt;    
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  @endsection
  
  @push('Extra-Footer-Scripts')
  
  @endpush
  </code></pre>
  
  <p>Route:- </p>
  
  <pre><code>Route::prefix('project01')-&gt;group(function (){
  
      Route::get('/', 'UserlistController@index');
  
      Route::post('create', 'UserlistController@store')-&gt;name('store');
  
  });
  
  </code></pre>
  
  <p>Please let me know if anyone know solution of this issue. i do not know why this not working for me.</p>