$userId, 'endpoint' => $validated['endpoint'], ], [ 'public_key' => $validated['publicKey'], 'auth_token' => $validated['authToken'], ] ); } public function deleteSubscription(string $endpoint, int $userId): void { PushSubscription::where('user_id', $userId) ->where('endpoint', $endpoint) ->delete(); } }