different names in different dynamics
This commit is contained in:
@@ -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('participants', function (Blueprint $table) {
|
||||
$table->string('display_name')->nullable()->after('role');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('participants', function (Blueprint $table) {
|
||||
$table->dropColumn('display_name');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -56,9 +56,9 @@ class DatabaseSeeder extends Seeder
|
||||
]);
|
||||
|
||||
// Add participants (Test User is owner, Alice is owner, Bob is submissive/participant)
|
||||
$velvetSanctuary->participants()->attach($testUser->id, ['role' => 'owner']);
|
||||
$velvetSanctuary->participants()->attach($testUser->id, ['role' => 'owner', 'display_name' => 'The Master']);
|
||||
$velvetSanctuary->participants()->attach($alice->id, ['role' => 'owner']);
|
||||
$velvetSanctuary->participants()->attach($bob->id, ['role' => 'participant']);
|
||||
$velvetSanctuary->participants()->attach($bob->id, ['role' => 'participant', 'display_name' => 'Bitch Boi']);
|
||||
|
||||
// Chat has been auto-created by the booted hook on Dynamic
|
||||
$velvetChat = $velvetSanctuary->chat;
|
||||
|
||||
Reference in New Issue
Block a user