title: Redirect back with input not working in laravel 5.5
body: <p>I've used redirect back with input many times previously. But in this project I'm unable to do so. This is my <strong>controller</strong> method that handles the form request:</p>
  
  <pre><code>public function verifyMobileCode( Request $request)
  {
          $userId = Auth::user()-&gt;id;
          if( Auth::user()-&gt;verification_code == $request['verification_code'])
          {
              User::where('id', $userId)-&gt;update(['verified'=&gt;1]);
              return redirect('/')-&gt;with('success', 'Account verified.');
          }
          else
          {
              return redirect()-&gt;back()-&gt;withErrors('verification_code' ,'unv' )-&gt;withInput($request-&gt;all());
          }
  }
  </code></pre>
  
  <p>This is my form blade:</p>
  
  <pre><code>@extends('layouts.index')
  
  @section('content')
  
  &lt;div class="container" style='padding-top: 150px;'&gt;
  
      &lt;?php var_dump($errors) ; ?&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-8 col-md-offset-2"&gt;
              &lt;div class="panel panel-default"&gt;
                  &lt;div class="panel-heading"&gt;Verify your mobile&lt;/div&gt;
  
                  &lt;div class="panel-body"&gt;
                      &lt;form class="form-horizontal" method="POST" action="{{ route('verifyMobileCode') }}"&gt;
                          {{ csrf_field() }}
  
                          &lt;div class="form-group{{ $errors-&gt;has('verification_code') ? ' has-error' : '' }}"&gt;
                              &lt;label for="verification_code" class="col-md-4 control-label"&gt;Verification code&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="verification_code" type="text" class="form-control" name="verification_code" value="{!! old('verification_code') !!}" required autofocus maxlength="6" pattern="\d{6}"&gt;
  
                                  @if ($errors-&gt;has('verification_code'))
                                      &lt;span class="help-block"&gt;
                                          &lt;strong&gt;Please enter 6 digit number sent to your mobile.&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group"&gt;
                              &lt;div class="col-md-6 col-md-offset-4"&gt;
                                  &lt;button type="submit" class="btn btn-primary"&gt;
                                      Register
                                  &lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endsection
  </code></pre>
  
  <p>My Kernel.php is as follows:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http;
  
  use Illuminate\Foundation\Http\Kernel as HttpKernel;
  
  class Kernel extends HttpKernel
  {
      /**
       * The application's global HTTP middleware stack.
       *
       * These middleware are run during every request to your application.
       *
       * @var array
       */
      protected $middleware = [
          \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
          \Illuminate\Session\Middleware\StartSession::class,
          \App\Http\Middleware\LanguageSwitcher::class,
          \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
          \App\Http\Middleware\TrimStrings::class,
          \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
          \App\Http\Middleware\TrustProxies::class,
      ];
  
      /**
       * The application's route middleware groups.
       *
       * @var array
       */
      protected $middlewareGroups = [
          'web' =&gt; [
              \App\Http\Middleware\EncryptCookies::class,
              \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
              \Illuminate\Session\Middleware\StartSession::class,
              // \Illuminate\Session\Middleware\AuthenticateSession::class,
              \Illuminate\View\Middleware\ShareErrorsFromSession::class,
              \App\Http\Middleware\VerifyCsrfToken::class,
              \Illuminate\Routing\Middleware\SubstituteBindings::class,
          ],
  
          'api' =&gt; [
              'throttle:60,1',
              'bindings',
          ],
      ];
  
      /**
       * The application's route middleware.
       *
       * These middleware may be assigned to groups or used individually.
       *
       * @var array
       */
      protected $routeMiddleware = [
          'auth' =&gt; \Illuminate\Auth\Middleware\Authenticate::class,
          'auth.basic' =&gt; \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
          'bindings' =&gt; \Illuminate\Routing\Middleware\SubstituteBindings::class,
          'can' =&gt; \Illuminate\Auth\Middleware\Authorize::class,
          'guest' =&gt; \App\Http\Middleware\RedirectIfAuthenticated::class,
          'throttle' =&gt; \Illuminate\Routing\Middleware\ThrottleRequests::class,
          'is-admin' =&gt; \App\Http\Middleware\IsAdminMiddleware::class,
      ];
  }
  </code></pre>
  
  <p>I do not find any error or something wrong. Is there anything you see? Is there any <strong>technique to debug this behaviour?</strong> Thaks in advance.</p>