how to register middleware in packages laravel 8 code example
Example: laravel set middleware default
If you want a middleware to run during every HTTP request to your application, list the middleware class in the $middleware property of your app/Http/Kernel.php class.