From 4a144436578ad955bf7fc15ec0bebb19b42a03fb Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Sat, 16 Dec 2023 05:24:33 +0330 Subject: [PATCH] refactor: made methods public to allow method overriding --- Loaders/MiddlewaresLoaderTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Loaders/MiddlewaresLoaderTrait.php b/Loaders/MiddlewaresLoaderTrait.php index 150197f0..eb823cee 100644 --- a/Loaders/MiddlewaresLoaderTrait.php +++ b/Loaders/MiddlewaresLoaderTrait.php @@ -21,7 +21,7 @@ public function loadMiddlewares(): void /** * @throws BindingResolutionException */ - private function registerMiddleware(array $middlewares = []): void + public function registerMiddleware(array $middlewares = []): void { $httpKernel = $this->app->make(Kernel::class); @@ -30,7 +30,7 @@ private function registerMiddleware(array $middlewares = []): void } } - private function registerMiddlewareGroups(array $middlewareGroups = []): void + public function registerMiddlewareGroups(array $middlewareGroups = []): void { foreach ($middlewareGroups as $key => $middleware) { if (!is_array($middleware)) { @@ -43,7 +43,7 @@ private function registerMiddlewareGroups(array $middlewareGroups = []): void } } - private function registerMiddlewarePriority(array $middlewarePriority = []): void + public function registerMiddlewarePriority(array $middlewarePriority = []): void { foreach ($middlewarePriority as $key => $middleware) { if (!in_array($middleware, $this->app['router']->middlewarePriority)) { @@ -52,7 +52,7 @@ private function registerMiddlewarePriority(array $middlewarePriority = []): voi } } - private function registerMiddlewareAliases(): void + public function registerMiddlewareAliases(): void { foreach ($this->getMiddlewareAliases() as $key => $value) { $this->app['router']->aliasMiddleware($key, $value);