This commit is contained in:
gholak tala
2026-01-24 14:03:11 +00:00
parent 7dcd83715a
commit eb26afbcb3
224 changed files with 32652 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Services;
use Illuminate\Support\Facades\Http;
class NotificationService
{
protected $endpoint;
protected $primaryKey;
public function __construct()
{
$this->endpoint = 'https://<your-namespace>.servicebus.windows.net/<your-notification-hub>/messages';
$this->primaryKey = env('AZURE_NOTIFICATION_HUB_PRIMARY_KEY');
}
public function sendNotification($message)
{
$response = Http::withHeaders([
'Authorization' => $this->primaryKey,
'Content-Type' => 'application/json'
])->post($this->endpoint, [
'data' => $message
]);
return $response->json();
}
}