Skip to content
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

Documentation has namespace typo. #2520

Closed
superuser-me opened this issue Oct 16, 2023 · 2 comments
Closed

Documentation has namespace typo. #2520

superuser-me opened this issue Oct 16, 2023 · 2 comments

Comments

@superuser-me
Copy link

This is my first issue & i'm a beginner and naive, who's learning programming!

On This page,
https://spatie.be/docs/laravel-permission/v5/basic-usage/middleware#content-package-middleware

'role' => \Spatie\Permission\Middleware\RoleMiddleware::class,

when i tried registering package middleware inside kernel file it threw error

Target class [Spatie\Permission\Middleware\RoleMiddleware] does not exist.

i resolved it by replacing it to

'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,

The first set uses Middleware as the namespace, while the second set uses Middlewares.

Changing it to Middlewares solved my issue.

i think docs has this typo so creating this issue!

I'm on
PHP 8.1.24
Laravel 10.28.0

@erikn69
Copy link
Contributor

erikn69 commented Oct 16, 2023

@drbyte
Copy link
Collaborator

drbyte commented Oct 16, 2023

Thanks for pointing it out. Will be releasing v6 this week, so the docs will be back in sync again then!
Apologies for any confusion!

@drbyte drbyte closed this as completed Oct 16, 2023
@spatie spatie locked as resolved and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants