Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-static method Ichtrojan\\Otp\\Otp::generate() cannot be called statically #11

Closed
dtobi59 opened this issue Jun 3, 2021 · 2 comments

Comments

@dtobi59
Copy link

dtobi59 commented Jun 3, 2021

This was the error I got after adding the package to my laravel,

Non-static method Ichtrojan\Otp\Otp::generate() cannot be called statically

@arslannawaz
Copy link

This was the error I got after adding the package to my laravel,

Non-static method Ichtrojan\Otp\Otp::generate() cannot be called statically

@dtobi59, here is the solution

Use Otp;

$otp = new Otp;
$otp_token = $otp->generate('michael@okoh.co.uk', 6, 15);

@wychoong
Copy link

@ichtrojan this issue from 2021 is not fixed, why is it closed? is the commented way is the supported way of using? if so why not update the doc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants