Skip to content

Commit

Permalink
refactor: made methods public to allow method overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Dec 16, 2023
1 parent b5c7876 commit 4a14443
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Loaders/MiddlewaresLoaderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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)) {
Expand All @@ -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)) {
Expand All @@ -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);
Expand Down

0 comments on commit 4a14443

Please sign in to comment.