Skip to content

[Bug]: Aliased middleware are not being recognized in routes #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Preslav-Stoyanov opened this issue Apr 1, 2025 · 1 comment · May be fixed by #358
Open

[Bug]: Aliased middleware are not being recognized in routes #356

Preslav-Stoyanov opened this issue Apr 1, 2025 · 1 comment · May be fixed by #358
Assignees
Labels

Comments

@Preslav-Stoyanov
Copy link

Preslav-Stoyanov commented Apr 1, 2025

Extension Version

1.0.5

PHP Binary

Local PHP

Operating System

Linux

What happened?

I made a middleware alias and it is working, but it's showing an error: "Middleware [alias] not found."

Mimimal Code Sample

// bootstrap/app.php
$middleware->alias([
    'alias' => App\Http\Middleware\SomeMiddleware::class
]);

// routes/web.php
Route::get('/route', [SomeController::class, 'index'])
    ->middleware('alias');
@N1ebieski
Copy link
Contributor

For me, it's working, but I had to reload the vscode window to get the extension to reload the middleware.

I've created the PR #358 with the additional pattern for auto reload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants