Update: 2026-07-23 16:56:57
This commit is contained in:
@@ -11,9 +11,15 @@ class FcmService
|
||||
|
||||
public function __construct(?Redis $redis = null)
|
||||
{
|
||||
$this->redis = $redis;
|
||||
// المسار بناء على بنية المشروع
|
||||
$this->serviceAccountFile = getenv('FIREBASE_SERVICE_ACCOUNT_PATH');
|
||||
$this->redis = $redis;
|
||||
$envPath = getenv('FIREBASE_SERVICE_ACCOUNT_PATH') ?: '';
|
||||
if (!empty($envPath) && file_exists($envPath)) {
|
||||
$this->serviceAccountFile = $envPath;
|
||||
} elseif (file_exists('/keys/firebase_service_account.json')) {
|
||||
$this->serviceAccountFile = '/keys/firebase_service_account.json';
|
||||
} else {
|
||||
$this->serviceAccountFile = __DIR__ . '/../../keys/firebase_service_account.json';
|
||||
}
|
||||
}
|
||||
|
||||
// ── إرسال إشعار ────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user