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

"chrisbjr/api-guard": "3.0.*" - generate api key from php #145

Open
iateadonut opened this issue Apr 4, 2017 · 2 comments
Open

"chrisbjr/api-guard": "3.0.*" - generate api key from php #145

iateadonut opened this issue Apr 4, 2017 · 2 comments

Comments

@iateadonut
Copy link

"chrisbjr/api-guard": "3.0.*" in Laravel 5.3 - is there a way to generate an api key from php?

@Tjoosten
Copy link
Contributor

Tjoosten commented Apr 4, 2017

To generate an API key from within your application, you can use the following method in the ApiKey model:

$apiKey = Chrisbjr\ApiGuard\Models\ApiKey::make();

This is found in the repo readme.

@iateadonut
Copy link
Author

On Laravel 5.3.29, I'm getting this error:

$apiKey = Chrisbjr\ApiGuard\Models\ApiKey::make();
BadMethodCallException with message 'Call to undefined method Illuminate\Database\Query\Builder::make()'

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

2 participants