Skip to content
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::table('groups', function (Blueprint $table) {
$table->softDeletes()->index();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's pretty cool.

});
}

public function down(): void
{
Schema::table('groups', function (Blueprint $table) {
$table->dropSoftDeletes();
});
}
};