Skip to content

Commit 83874d9

Browse files
committed
fix: Realtime notification issue
1 parent 398dc81 commit 83874d9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/Classes/NotificationBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public function convertToBroadcastable(): array
5454
break;
5555
}
5656

57+
Carbon::setLocale($this->locale ?: env('APP_LOCALE', 'tr'));
58+
5759
$object = [
5860
'notification_id' => $this->notification->id,
5961
'title' => $title,

routes/channels.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
|
1212
*/
1313

14-
Broadcast::channel('App.User.{id}', function ($user, $id) {
14+
use Illuminate\Support\Facades\Broadcast;
15+
16+
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
1517
return (int) $user->id === (int) $id;
1618
});

0 commit comments

Comments
 (0)