From 6f8e504e98a0ade3e69cbdeebccc8c60b72ab6e9 Mon Sep 17 00:00:00 2001 From: bvbej Date: Thu, 29 Sep 2022 09:58:49 +0800 Subject: [PATCH] [edit] comment --- src/Providers/BvBeJServiceProvider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Providers/BvBeJServiceProvider.php b/src/Providers/BvBeJServiceProvider.php index a1d443c..fb3d0c5 100644 --- a/src/Providers/BvBeJServiceProvider.php +++ b/src/Providers/BvBeJServiceProvider.php @@ -3,10 +3,12 @@ declare(strict_types=1); namespace BvBeJ\Providers; +use Illuminate\Support\Facades\DB; use Illuminate\Support\ServiceProvider; use BvBeJ\Commands\ApolloConfigSync; use BvBeJ\Handles\Apollo\Client; use BvBeJ\Handles\BvBeJHandle; +use Illuminate\Database\Schema\Blueprint; class BvBeJServiceProvider extends ServiceProvider @@ -26,6 +28,10 @@ class BvBeJServiceProvider extends ServiceProvider ApolloConfigSync::class ]); } + + Blueprint::macro('comment', function ($comment) { + $this->charset = DB::connection()->getConfig('charset') . " COMMENT='{$comment}'"; + }); } /**