alifcapital/lumen-user-service-client

Lumen client for https://github.com/alifcapital/alifcore-service-user
7,488
Install
composer require alifcapital/lumen-user-service-client
PHP:^7.4|^8.0
License:MIT
Last Updated:Mar 30, 2022
Links: GitHub  ·  Packagist
Maintainer: alifcapital

User Service lumen client Package

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664