You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[11.x] Add middleware alias registration example for EnsureUserHasRole middleware (laravel#9906)
* [11.x] Add middleware alias registration example for EnsureUserHasRole middleware
This commit adds information about registering a middleware alias for the `EnsureUserHasRole` middleware example in the "Middleware Parameters" section of the documentation.
The current documentation provides an example of the `EnsureUserHasRole` middleware and how to use it with parameters, but it doesn't mention the necessary step of registering the middleware alias. This addition will help users avoid confusion when implementing the middleware in their applications.
Changes made:
1. Added a code snippet demonstrating how to register the `EnsureUserHasRole` middleware alias in the `bootstrap/app.php` file.
2. Placed the new information immediately after the middleware class example and before the route definition examples.
* Update middleware.md
* Update middleware.md
---------
Co-authored-by: Taylor Otwell <[email protected]>
0 commit comments