PHP code example of luoxiaojun1992 / laravel-tars

1. Go to this page and download the library: Download luoxiaojun1992/laravel-tars library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

luoxiaojun1992 / laravel-tars example snippets


   $app->register(\Lxj\Laravel\Tars\ServiceProvider::class);
   

   'registries' => [
        [
            'type' => 'kong',
            'url' => 'http://kong:8001/upstreams/tars_mysql8/targets', //根据实际情况填写
        ]
   ]
   

   'log_level' => \Monolog\Logger::INFO
   

    $router->get('/test', function () {
        \Illuminate\Support\Facades\Log::info('laravel tars test log');
        return 'Laravel Tars Test Success';
    });
   
 artisan tars:deploy

   php artisan vendor:publish --tag=tars