diff --git a/docs/4.x/extend/controllers.md b/docs/4.x/extend/controllers.md index 584bcf29f..868712e31 100644 --- a/docs/4.x/extend/controllers.md +++ b/docs/4.x/extend/controllers.md @@ -211,7 +211,7 @@ Perform request validation in your controller’s `beforeAction()` method to enf Craft requires a valid [CSRF token](../dev/controller-actions.md#csrf) for any POST requests. This can be disabled for an entire controller by overriding its `$enableCsrfValidation` property, or just for a specific action: ```php -public function beforeAction($actionId) +public function beforeAction($actionId): bool { // Don’t require a CSRF token for incoming webhooks: if ($actionId === 'receive-webhook') {