Laragear / TwoFactor

Two-Factor Authentication for all your users out-of-the-box.
https://github.com/sponsors/DarkGhostHunter
MIT License
261 stars 20 forks source link

Laravel 10 non-compatible examples #43

Closed jitterbux closed 1 year ago

jitterbux commented 1 year ago

PHP & Platform

8.2.3

Database

MySQL 8

Laravel version

10.1.5

Have you done this?

Expectation

I treid to make it work on Laravel 10 with Breeze installed but it's not working. Is it Laravel 10 compatible?

Description

The docs seem to be for older Laravel version.

For example I am getting this error when I try to add traits as in your docs: Undefined type 'Laragear\TwoFactor\Contracts\TwoFactorAuthenticatable'.intelephense(1009)

Reproduction

Also the implementation with routing and/or breeze etc. is missing in the docs as well.

By the way, is there any demo app or existing app where we can look how it should be implemented? I am especially interested in routes in the final app. But also final controllers.

Stack trace & logs

No response

DarkGhostHunter commented 1 year ago

I treid to make it work on Laravel 10 with Breeze installed but it's not working. Is it Laravel 10 compatible?

Yes

The docs seem to be for older Laravel version.

Only the links.

For example I am getting this error when I try to add traits as in your docs. Undefined type 'Laragear\TwoFactor\Contracts\TwoFactorAuthenticatable'.intelephense(1009)

If that was an error, the package wouldn't pass any test.

Also the implementation with routing and/or breeze etc. is missing in the docs as well.

Haven't using Breeze in years. You're free to PR with the instructions.

By the way, is there any demo app or existing app where we can look how it should be implemented?

I would but not my focus right now.