public function middleware($middlewareQueue)
    {
        $middlewareQueue
            // Catch any exceptions in the lower layers,
            // and make an error page/response
            ->add(ErrorHandlerMiddleware::class)

            // Handle plugin/theme assets like CakePHP normally does.
            ->add(AssetMiddleware::class)

            // Add routing middleware.
            ->add(new RoutingMiddleware($this));

        return $middlewareQueue;
    }
public function middleware($middlewareQueue)
    {
        $middlewareQueue
            // Catch any exceptions in the lower layers,
            // and make an error page/response
            ->add(ErrorHandlerMiddleware::class)

            // Handle plugin/theme assets like CakePHP normally does.
            ->add(AssetMiddleware::class)

            // Add routing middleware.
            ->add(new RoutingMiddleware($this));

        return $middlewareQueue;
    }
public function middleware ( $ middlewareQueue ) { $ middlewareQueue // Catch any exceptions in the lower layers, // and make an error page/response -> add ( ErrorHandlerMiddleware :: class ) // Handle plugin/theme assets like CakePHP normally does. -> add ( AssetMiddleware :: class ) // Add routing middleware. -> add ( new RoutingMiddleware ( $ this ) ) ; return $ middlewareQueue ; }
Setup the middleware queue your application will use.

@param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to setup.
@return \Cake\Http\MiddlewareQueue The updated middleware queue.
Setup the middleware queue your application will use .