header('X-Telegram-Bot-Api-Secret-Token', ''); if (! hash_equals($secret, $header)) { abort(403, 'Invalid webhook secret'); } } try { $bot->run(); } catch (\InvalidArgumentException $e) { // FakeNutgram with no update (unit tests) — still ACK the webhook probe. if (! app()->runningUnitTests()) { throw $e; } } return response()->noContent(); } }