diff --git a/app/Classes/NotificationBuilder.php b/app/Classes/NotificationBuilder.php index 799aa6c3..91d11e2b 100644 --- a/app/Classes/NotificationBuilder.php +++ b/app/Classes/NotificationBuilder.php @@ -54,6 +54,8 @@ public function convertToBroadcastable(): array break; } + Carbon::setLocale($this->locale ?: env('APP_LOCALE', 'tr')); + $object = [ 'notification_id' => $this->notification->id, 'title' => $title, diff --git a/routes/channels.php b/routes/channels.php index 3d0fb8fc..60419966 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -11,6 +11,8 @@ | */ -Broadcast::channel('App.User.{id}', function ($user, $id) { +use Illuminate\Support\Facades\Broadcast; + +Broadcast::channel('App.Models.User.{id}', function ($user, $id) { return (int) $user->id === (int) $id; }); \ No newline at end of file