增加 登录授权码

This commit is contained in:
iVampireSP.com 2023-03-18 21:35:43 +08:00
parent ad8b41eafc
commit 5ea475c2c6
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 29 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class User extends Authenticatable
'name',
'email',
'password',
'auth_code'
];
/**

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('auth_code')->nullable()->after('password')->comment('授权码');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('auth_code');
});
}
};