You want to remove a piece of middleware from the your application.
// Remove a class you've already registered App::removeMiddleware('MyApp\Middleware'); // Remove the FrameGuard middleware App::removeMiddleware('Illuminate\Http\FrameGuard');
This low level method must be called early in the lifecycle.
Specifically, it must be called within the
register() method of a service provider. If you call it any later it will have no effect.
The point you must call this method is before the block labeled "Build stacked HTTP Kernel" in the booting steps displayed in the Understanding the Request Lifecycle recipe.
You cannot remove the following middleware from your application:
These items are provided by Laravel's core.