implement sending Emoji, pin or mute conversation
This commit is contained in:
@@ -26,6 +26,7 @@ class ConversationParticipantFactory extends Factory
|
||||
'joined_at' => fake()->dateTimeBetween('-2 months', 'now'),
|
||||
'last_read_at' => fake()->optional(0.85)->dateTimeBetween('-2 weeks', 'now'),
|
||||
'muted_until' => null,
|
||||
'pinned_at' => null,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?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('conversation_participants', function (Blueprint $table): void {
|
||||
$table->timestamp('pinned_at')->nullable()->after('muted_until');
|
||||
$table->index(['user_id', 'pinned_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('conversation_participants', function (Blueprint $table): void {
|
||||
$table->dropIndex(['user_id', 'pinned_at']);
|
||||
$table->dropColumn('pinned_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user