protected function mapForBrowser(Router $router, $routes, $applyAlwaysAuthenticate)
    {
        $middleware = [
            EncryptCookies::class,
            AddQueuedCookiesToResponse::class,
            StartSession::class,
            ShareErrorsFromSession::class,
            VerifyCsrfToken::class,
            SubstituteBindings::class,
        ];

        if ($applyAlwaysAuthenticate && !$this->isWhiteListedAuthRoute($routes)) {
            $middleware[] = Authenticate::class;
        }

        $router->group(['middleware' => $middleware], function (Router $router) use ($routes) {
            $routes->map($router);
        });
    }
protected function mapForBrowser(Router $router, $routes, $applyAlwaysAuthenticate)
    {
        $middleware = [
            EncryptCookies::class,
            AddQueuedCookiesToResponse::class,
            StartSession::class,
            ShareErrorsFromSession::class,
            VerifyCsrfToken::class,
            SubstituteBindings::class,
        ];

        if ($applyAlwaysAuthenticate && !$this->isWhiteListedAuthRoute($routes)) {
            $middleware[] = Authenticate::class;
        }

        $router->group(['middleware' => $middleware], function (Router $router) use ($routes) {
            $routes->map($router);
        });
    }
protected function mapForBrowser ( Router $ router , $ routes , $ applyAlwaysAuthenticate ) { $ middleware = [ EncryptCookies :: class , AddQueuedCookiesToResponse :: class , StartSession :: class , ShareErrorsFromSession :: class , VerifyCsrfToken :: class , SubstituteBindings :: class , ] ; if ( $ applyAlwaysAuthenticate && ! $ this -> isWhiteListedAuthRoute ( $ routes ) ) { $ middleware [ ] = Authenticate :: class ; } $ router -> group ( [ 'middleware' => $ middleware ] , function ( Router $ router ) use ( $ routes ) { $ routes -> map ( $ router ) ; } ) ; }
Wrap the routes in the browser specific middleware.

@param \Illuminate\Routing\Router $router
@param object                     $routes
@param bool                       $applyAlwaysAuthenticate

@return void
Wrap the routes in the browser specific middleware .