current state
This commit is contained in:
@@ -22,7 +22,7 @@ class Chat
|
||||
return;
|
||||
}
|
||||
|
||||
$last = DB::connection('legacy')->table('chat')
|
||||
$last = DB::table('chat')
|
||||
->select('message')
|
||||
->where('user_id', $userId)
|
||||
->orderByDesc('chat_id')
|
||||
@@ -30,7 +30,7 @@ class Chat
|
||||
->first();
|
||||
|
||||
if (!$last || ($last->message ?? '') !== $tekst) {
|
||||
DB::connection('legacy')->table('chat')->insert([
|
||||
DB::table('chat')->insert([
|
||||
'time' => now(),
|
||||
'sender' => $username,
|
||||
'user_id' => $userId,
|
||||
@@ -43,7 +43,7 @@ class Chat
|
||||
{
|
||||
$output = "<ul>";
|
||||
|
||||
$chats = DB::connection('legacy')->table('chat')
|
||||
$chats = DB::table('chat')
|
||||
->select('time', 'sender', 'message')
|
||||
->orderByDesc('chat_id')
|
||||
->limit((int)$num_rows ?: 8)
|
||||
|
||||
Reference in New Issue
Block a user