Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.x] Add middleware alias registration example for EnsureUserHasRol…
…e middleware (#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 <taylor@laravel.com>
- Loading branch information