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'); + }); + } +};