alifcapital / lumen-user-service-client
Lumen client for https://github.com/alifcapital/alifcore-service-user
Installs: 7 086
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- guzzlehttp/guzzle: ^7.3
- laravel/lumen-framework: ^8.0|^9.0
- lcobucci/jwt: ^4.1
This package is auto-updated.
Last update: 2025-01-29 06:50:55 UTC
README
User Client 0.1 for Lumen 8
Installation
add this lines to composer.json file:
composer require alifcapital/alifcore-service-user-client-lumen
add this line in Register Service Providers section (bootstrap/app.php):
$app->register(AlifCapital\UserServiceClient\ServiceProvider::class);
add routeMiddleware (bootstrap\app.php):
$app->routeMiddleware([ 'auth' => App\Http\Middleware\Authenticate::class, 'role' => AlifCapital\UserServiceClient\Http\Middleware\RoleMiddleware::class ]);
Configuration
- Run
php artisan user_client:publish-config
to publish configs (config/user_client.php
)
add this line in Register configure section (bootstrap/app.php):
$app->configure('user_client');
add this line in Environments (.env):
USER_CLIENT_SERVICE_NAME=alif-shop-settings #(every service had unique service_name) USER_SERVICE_BASE_URL={url}/service_user #(URL of user service) USER_CLIENT_PUBLIC_KEY_TTL=60 #CACHE IN SECOUNDS
migrate:
php artisan migrate