show the chat again
This commit is contained in:
parent
d0b173fe76
commit
806d17842f
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Models\Chat;
|
||||||
|
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
|
||||||
|
{
|
||||||
|
Chat::unguard();
|
||||||
|
\App\Models\Chat::all()->each(function (Chat $chat) {
|
||||||
|
$newType = match($chat->chatable_type) {
|
||||||
|
\App\Models\Mutation::class => 'mutation',
|
||||||
|
\App\Models\Ledger::class => 'ledger',
|
||||||
|
\App\Models\Dynamic::class => 'dynamic',
|
||||||
|
default => $chat->chatable_type,
|
||||||
|
};
|
||||||
|
$chat->update(['chatable_type' => $newType]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.c-chat__message {
|
.c-chat__message {
|
||||||
@apply overflow-hidden p-4 shadow-sm sm:rounded-lg;
|
@apply p-4 shadow-sm sm:rounded-lg;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
|
|
||||||
&.c-chat__message--system {
|
&.c-chat__message--system {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user