Created
July 2, 2020 03:40
-
-
Save valterlorran/35e167742b95fcc34ce609b299f53089 to your computer and use it in GitHub Desktop.
How to creates a laravel passport client programmatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Get the passport client repository | |
| $clientRepository = app('Laravel\Passport\ClientRepository'); | |
| // for machine-to-machine authentication | |
| $client = $clientRepository->create(null, 'myclient', ''); | |
| // gets the client's id and secret | |
| $clientSecret = $client->secret; | |
| $clientId = $client->id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment