增加 类似Laravel admin 的Filament后台管理系统

This commit is contained in:
2025-05-20 23:01:28 +07:00
parent c79bd42b54
commit 4630421e08
28 changed files with 2350 additions and 13 deletions
@@ -0,0 +1,33 @@
<?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::create('users', function (Blueprint $table) {
$table->id();
$table->string('name', 100);
$table->string('email', 120)->unique();
$table->string('password');
$table->timestamps();
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_0900_ai_ci';
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
}
};
@@ -0,0 +1,35 @@
<?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::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};
@@ -11,9 +11,8 @@
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->id();
$table->timestamps();
Schema::table('users', function (Blueprint $table) {
$table->rememberToken()->after('password')->nullable();
});
}
@@ -22,6 +21,8 @@ public function up(): void
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('remember_token');
});
}
};