|
|
@@ -8,6 +8,7 @@ use App\Models\User;
|
|
|
use App\Notifications\Push\BasePushNotification;
|
|
|
use Illuminate\Support\Collection;
|
|
|
use Kreait\Firebase\Contract\Messaging;
|
|
|
+use Kreait\Firebase\Messaging\AndroidConfig;
|
|
|
use Kreait\Firebase\Messaging\CloudMessage;
|
|
|
use Kreait\Firebase\Messaging\Notification;
|
|
|
|
|
|
@@ -31,9 +32,12 @@ class PushNotificationService
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- $message = CloudMessage::new()->withNotification(
|
|
|
- Notification::create($notification->title(), $notification->body())
|
|
|
- );
|
|
|
+ $message = CloudMessage::new()
|
|
|
+ ->withNotification(Notification::create($notification->title(), $notification->body()))
|
|
|
+ ->withAndroidConfig(AndroidConfig::fromArray([
|
|
|
+ 'notification' => ['channel_id' => 'default'],
|
|
|
+ 'priority' => 'high',
|
|
|
+ ]));
|
|
|
|
|
|
$report = $this->messaging->sendMulticast($message, $tokens);
|
|
|
|