wujunze/apollo-laravel-client

Laravel apollo configuration-management client

1.0.3 2019-01-04 03:53 UTC

This package is not auto-updated.

Last update: 2022-07-02 00:41:16 UTC


README

Apollo configuration management Laravel client

中文说明

Build Status Latest Stable Version Licence Total Downloads

Features

Install

 composer require wujunze/apollo-laravel-client 

in your console to publish default configuration files.

If you use Laravel < 5.5 run:

php artisan vendor:publish --provider="WuJunze\LaravelApollo\Providers\ServiceProvider"

If you are using Laravel 5.5 run:

php artisan vendor:publish

and choose the number matching "WuJunze\LaravelApollo\Providers\ServiceProvider" provider. This operation will create config file in config/apollo.php.

Configuration

you can change the locale at config/apollo.php

[
//Your env template  Just fill it out according to Laravel's env file 
    'env_tpl' =>
"APP_NAME = {APP_NAME}
APP_ENV = {APP_ENV}
APP_KEY = {APP_KEY}",
    'env_dir' => env('ENV_DIR', app_path()),
    'env_file' => env('ENV_FILE', '.env'),
    'save_dir' => env('SAVE_DIR', storage_path()),
    'server' => env('APOLLO_SERVER', 'http://127.0.0.1:8080'),
    //Apollo app_id
    'app_id' => env('APOLLO_SERVER_APP_ID', 'contract'),
    'namespaces' => env('APOLLO_SERVER_APP_ID', ['application']),
    // Grayscale published client IP
    'client_ip' => env('APOLLO_CLIENT_IP'),
    'restart' => env('APOLLO_RESTART', false),

    'cluster' => env('APOLLO_CLUSTER', 'default'),
    'pull_timeout' => env('APOLLO_PULL_TIMEOUT', 10),
    'interval_timeout' => env('APOLLO_INTERVAL_TIMEOUT', 60),
];

Usage

run the command

 php artisan apollo:update

Inspiration and Thanks

Apollo
apollo-php-client

License

MIT