[add] BvBeJ

This commit is contained in:
BvBeJ 2021-11-30 21:34:25 +08:00
parent 08da50a0b7
commit 504b6483e1
10 changed files with 31 additions and 31 deletions

View File

@ -1,3 +1,3 @@
```shell
php artisan vendor:publish --provider=StarPoolCloud\Providers\StarPoolCloudServiceProvider
php artisan vendor:publish --provider=BvBeJ\Providers\BvBeJServiceProvider
```

View File

@ -1,5 +1,5 @@
{
"name": "starpoolcloud/base-php",
"name": "bvbej/base-php",
"license": "MIT",
"authors": [
{
@ -19,7 +19,7 @@
},
"autoload": {
"psr-4": {
"StarPoolCloud\\": "src/"
"BvBeJ\\": "src/"
},
"files": [
"src/Handles/File/helper.php",
@ -29,10 +29,10 @@
"extra": {
"laravel": {
"providers": [
"StarPoolCloud\\Providers\\StarPoolCloudServiceProvider"
"BvBeJ\\Providers\\BvBeJServiceProvider"
],
"aliases": {
"StarPoolCloud": "StarPoolCloud\\Facades\\StarPoolCloudFacade"
"BvBeJ": "BvBeJ\\Facades\\BvBeJFacade"
}
}
}

View File

@ -1,7 +1,7 @@
<?php
return [
'server_addr' => 'https://apollo.config.squrab.com',
'server_addr' => 'https://config.bvbej.com',
'cluster' => 'dev',
'client_ip' => '127.0.0.1',
'appid' => env('APP_NAME', ''),

View File

@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
namespace StarPoolCloud\Commands;
namespace BvBeJ\Commands;
use Exception;
use Illuminate\Console\Command;
@ -38,7 +38,7 @@ class ApolloConfigSync extends Command
public function handle()
{
try {
app('StarPoolCloudApollo')->updateEnv();
app('BvBeJApollo')->updateEnv();
$this->info('Success');
} catch (Exception $exception) {
$this->error("Error{$exception->getMessage()}");

View File

@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
namespace StarPoolCloud\Facades;
namespace BvBeJ\Facades;
use Illuminate\Support\Facades\Facade;
@ -15,10 +15,10 @@ use Illuminate\Support\Facades\Facade;
* @method static PostJsonRequest(string $url, array $params, array $header = []): string
* @method static YouDaoTextTranslator(string $appID, string $secret, string $text, string $lang): string
*/
class StarPoolCloudFacade extends Facade
class BvBeJFacade extends Facade
{
protected static function getFacadeAccessor(): string
{
return 'StarPoolCloud';
return 'BvBeJ';
}
}

View File

@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
namespace StarPoolCloud\Handles\Apollo;
namespace BvBeJ\Handles\Apollo;
use Dotenv\Dotenv;
use Exception;

View File

@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
namespace StarPoolCloud\Handles\Apollo;
namespace BvBeJ\Handles\Apollo;
class Signature
{

View File

@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
namespace StarPoolCloud\Handles;
namespace BvBeJ\Handles;
use GuzzleHttp\Client;
use GuzzleHttp\RequestOptions;
@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Log;
use Ramsey\Uuid\Rfc4122\UuidV4;
use Ramsey\Uuid\Uuid;
class StarPoolCloudHandle
class BvBeJHandle
{
const DATE_FORMAT = 'Y-m-d H:i:s';

View File

@ -1,6 +1,6 @@
<?php
namespace StarPoolCloud\Handles\Trait;
namespace BvBeJ\Handles\Trait;
use Illuminate\Auth\Events\Lockout;
use Illuminate\Cache\RateLimiter;

View File

@ -1,15 +1,15 @@
<?php
declare(strict_types=1);
namespace StarPoolCloud\Providers;
namespace BvBeJ\Providers;
use Illuminate\Support\ServiceProvider;
use StarPoolCloud\Commands\ApolloConfigSync;
use StarPoolCloud\Handles\Apollo\Client;
use StarPoolCloud\Handles\StarPoolCloudHandle;
use BvBeJ\Commands\ApolloConfigSync;
use BvBeJ\Handles\Apollo\Client;
use BvBeJ\Handles\BvBeJHandle;
class StarPoolCloudServiceProvider extends ServiceProvider
class BvBeJServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@ -35,10 +35,10 @@ class StarPoolCloudServiceProvider extends ServiceProvider
*/
public function register()
{
$this->app->singleton('StarPoolCloud', function () {
return new StarPoolCloudHandle();
$this->app->singleton('BvBeJ', function () {
return new BvBeJHandle();
});
$this->app->singleton('StarPoolCloudApollo', function () {
$this->app->singleton('BvBeJApollo', function () {
return new Client(config('apollo'));
});
}