64robots / products-api-accessor
This package is a command that will generate the access-token for a product-api project.
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/64robots/products-api-accessor
Requires
- php: ^7.1
- guzzlehttp/guzzle: ~6.0
- illuminate/console: 6.*
- illuminate/container: 6.*
- illuminate/support: 6.*
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2025-09-29 02:21:44 UTC
README
This package is a command that will generate the access-token for a product-api project.
Installation and setup
To get the latest version, simply require the package using Composer:
$ composer require 64robots/products-api-accessor
Once installed, this package will automatically register its service provider.
Publish the config file to config/products.php run:
$ php artisan vendor:publish --provider="R64\ProductsApiAccessor\AccessorServiceProvider" --tag="config"
Usage
- Use passport's command
php artisan passport:clientto generate new Client ID and Client Secret from Products api. Copy the Client ID and Client Secret and set it in your .env like so;
PRODUCTS_API_BASE_URI=http://url-to-products-api
PRODUCTS_API_CLIENT_ID=x
PRODUCTS_API_CLIENT_SECRET=xxxx
- Ran the command
php artisan generate:products-api-access-tokento generate access token. The token will be automatically set in the .env.