From 5ea475c2c625a560d62bc11379c10d61a8c4e086 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sat, 18 Mar 2023 21:35:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/User.php | 1 + ...18_133356_add_auth_code_to_users_table.php | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 database/migrations/2023_03_18_133356_add_auth_code_to_users_table.php diff --git a/app/Models/User.php b/app/Models/User.php index 60ab3f0..10f66bc 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -22,6 +22,7 @@ class User extends Authenticatable 'name', 'email', 'password', + 'auth_code' ]; /** diff --git a/database/migrations/2023_03_18_133356_add_auth_code_to_users_table.php b/database/migrations/2023_03_18_133356_add_auth_code_to_users_table.php new file mode 100644 index 0000000..75b290c --- /dev/null +++ b/database/migrations/2023_03_18_133356_add_auth_code_to_users_table.php @@ -0,0 +1,28 @@ +string('auth_code')->nullable()->after('password')->comment('授权码'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('auth_code'); + }); + } +};