title: The page isn’t redirecting properly Laravel 5.6
body: <blockquote>
    <p>kernel.php</p>
  </blockquote>
  
  <pre><code>    protected $routeMiddleware = [
          'auth' =&gt; \Illuminate\Auth\Middleware\Authenticate::class,
          'auth.basic' =&gt; \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
          'bindings' =&gt; \Illuminate\Routing\Middleware\SubstituteBindings::class,
          'cache.headers' =&gt; \Illuminate\Http\Middleware\SetCacheHeaders::class,
          'can' =&gt; \Illuminate\Auth\Middleware\Authorize::class,
          'guest' =&gt; \App\Http\Middleware\RedirectIfAuthenticated::class,
          'signed' =&gt; \Illuminate\Routing\Middleware\ValidateSignature::class,
          'throttle' =&gt; \Illuminate\Routing\Middleware\ThrottleRequests::class,
          'adminauth' =&gt; \App\Http\Middleware\AdminAuth::class,
      ];
  </code></pre>
  
  <blockquote>
    <p>web.php</p>
  </blockquote>
  
  <pre><code>Route::group(['middleware' =&gt; 'adminauth'], function() {
  
          //route for admin dashboard
          Route::get('/admin', [
                  'uses' =&gt; 'AdminController@dashboard',
                  'as' =&gt; 'dashboard'
          ]);
  
          //route for admin setting
          Route::get('/admin/setting', [
                  'uses' =&gt; 'AdminController@setting'
          ]);
  });
  </code></pre>
  
  <blockquote>
    <p>AdminAuth.php</p>
  </blockquote>
  
  <pre><code>public function handle($request, Closure $next)
      {
  
          return redirect('/admin/setting');
          //return $next($request);
      }
  </code></pre>
  
  <blockquote>
    <p>AdminController.php</p>
  </blockquote>
  
  <pre><code>public function setting() {
        $admin = $this-&gt;admin;
        $notification = $this-&gt;notification;
  
        return view('admin/setting')-&gt;with(compact(
          'admin',
          'notification'
        ));
      }
  </code></pre>
  
  <p>I'm facing this problem i.e., <strong><em>The page isn’t redirecting properly
  Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
      This problem can sometimes be caused by disabling or refusing to accept cookies.</em></strong> </p>
  
  <p>I read these posts <a href="https://stackoverflow.com/questions/46485574/redirect-issue-in-middleware-for-admin-login-in-laravel">link1</a>, <a href="https://laracasts.com/discuss/channels/general-discussion/the-page-isnt-redirecting-properly" rel="nofollow noreferrer">link2</a>, <a href="https://stackoverflow.com/questions/30374520/laravel5-oldmiddleware-the-page-isnt-redirecting-properly?lq=1">link3</a> but nothing solves my problem.</p>