Skip to content

Not all controllers support overriding the response #623

@smares

Description

@smares

Fortify Version

1.32.0

Laravel Version

12.39.0

PHP Version

8.4.14

Database Driver & Version

No response

Description

There are a handful of controllers that do not support overriding the response because the response is hard-coded in the controller.

  • ConfirmedPasswordStatusController::show
  • EmailVerificationNotificationController::show in the $request->user()->hasVerifiedEmail() case
  • TwoFactorQrCodeController::show
  • TwoFactorSecretKeyController::show
  • RecoveryCodeController::index

Especially the TwoFactorSecretKeyController is a bit annoying as the response uses a camelCase property which does not match the snake_case of everything else in the API.

I am overriding the routes to make the endpoints more "RESTful" and resource-oriented and would like all successful responses to be wrapped in data.

Steps To Reproduce

Nothing to reproduce, this is an architectural issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions