Level 102
You need to install the gmp extension in php.
Something like (change to fit your php version)
sudo apt install php7.2-gmp
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i install composer require laravel-notification-channels/webpush
when i try to generate php artisan webpush:vapid command then error like
Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined function gmp_init()
at /opt/lampp/htdocs/pg_final/pgmanagment/vendor/web-token/jwt-util-ecc/NistCurve.php:50
46| * Returns an NIST P-256 curve.
47| */
48| public static function curve256(): Curve
49| {
> 50| $p = \gmp_init('ffffffff00000001000000000000000000000000ffffffffffffffffffffffff', 16);
51| $a = \gmp_init('ffffffff00000001000000000000000000000000fffffffffffffffffffffffc', 16);
52| $b = \gmp_init('5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b', 16);
53| $x = \gmp_init('6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296', 16);
54| $y = \gmp_init('4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5', 16);
Exception trace:
1 Jose\Component\Core\Util\Ecc\NistCurve::curve256()
/opt/lampp/htdocs/pg_final/pgmanagment/vendor/minishlink/web-push/src/VAPID.php:178
2 Minishlink\WebPush\VAPID::createVapidKeys()
/opt/lampp/htdocs/pg_final/pgmanagment/vendor/laravel-notification- channels/webpush/src/VapidKeysGenerateCommand.php:33
help me guys thanks
Please or to participate in this conversation.