Skip to content

Commit

Permalink
Fix typo (#9023)
Browse files Browse the repository at this point in the history
Both "an `App" and "a `App" appear in this documentation and most probably "an `App" is the correct version, so this PR is for consistency.

See #9022 

Sorry @taylorotwell , I thought I found them all, but I missed this one.
  • Loading branch information
peterhauke authored Sep 12, 2023
1 parent 1609eb7 commit c3a2cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ Laravel includes a middleware that can authorize actions before the incoming req
// The current user may update the post...
})->middleware('can:update,post');

In this example, we're passing the `can` middleware two arguments. The first is the name of the action we wish to authorize and the second is the route parameter we wish to pass to the policy method. In this case, since we are using [implicit model binding](/docs/{{version}}/routing#implicit-binding), a `App\Models\Post` model will be passed to the policy method. If the user is not authorized to perform the given action, an HTTP response with a 403 status code will be returned by the middleware.
In this example, we're passing the `can` middleware two arguments. The first is the name of the action we wish to authorize and the second is the route parameter we wish to pass to the policy method. In this case, since we are using [implicit model binding](/docs/{{version}}/routing#implicit-binding), an `App\Models\Post` model will be passed to the policy method. If the user is not authorized to perform the given action, an HTTP response with a 403 status code will be returned by the middleware.

For convenience, you may also attach the `can` middleware to your route using the `can` method:

Expand Down

0 comments on commit c3a2cb2

Please sign in to comment.