Thanks. Very well but i not understand server push you use. Use google? Where configurations? notification permission is not saved? should it always be requested? Thanks
@benixal9 ай бұрын
Thank you for your comment! In the video, I didn't use a specific push server explicitly because it depends on the user's browser. For instance, if a user is using Chrome, the endpoint is automatically generated as fcm.googleapis.com/fcm/send/... , or, if someone is using Firefox, the endpoint becomes updates.push.services.mozilla.com/wpush/v2/... , The browser takes care of this in the background. (In fact, this is one of the features of the browser and is provided by the browser) Regarding notification permission, it only needs to be requested once. Once the user grants permission, it's typically saved, and subsequent requests won't prompt the user again. You can check whether the user has a token, and if so, you don't need to request permission again. Also, if the user accepts the request once, the browser automatically knows this and will not ask the user questions and returns the same token as before.
@salvatorecervone63529 ай бұрын
@@benixal thanks for your answer. Is your code ready for testing? there is no need to add anything else in practice.
@benixal9 ай бұрын
Yes, I think the code is ready for testing. Additionally, if you're interested, I have another video where I explain the process using pure JavaScript and PHP: kzbin.info/www/bejne/ip-Zp3h6p7-dd7c
@salvatorecervone63529 ай бұрын
@@benixal i would integrate with vue. You test? I change anything?
@benixal9 ай бұрын
I haven't tested with vue, but it should integrate smoothly.
@hichamalaoui3411 ай бұрын
Excellent Tutorial. Thanks
@benixal11 ай бұрын
You are welcome! Glad it was helpful!
@adejulvian7 ай бұрын
this is great, thank you. but when i try from other computer it show error "cannot read properties of undefined (reading 'register')" in console tab browser developer tools. could you help me?
@devnull14848 ай бұрын
Nice, Thank you.😍😍
@benixal8 ай бұрын
Thank you! I'm glad you found the video helpful! 😊
@phdcmd7 ай бұрын
JSON data type for mysql column seems to be the proper way to go.
@faridmacadato43569 ай бұрын
when i use php artisan tinker to generate a public and private key it return runtimeException unable to create the key. Why is that?
@benixal9 ай бұрын
This issue usually occurs when the OpenSSL extension is not enabled (or not installed) in your PHP Solution #1: Enable OpenSSL Extension 1. Open the php.ini file. 2. Look for ;extension=openssl. 3. Take out the semicolon before it and save it Solution #2: Generate VAPID Keys Online If you don't have OpenSSL, you can use a website to make VAPID keys. Just search "generate VAPID keys." But remember, this Solution (#2) is mainly for practice, not real projects
@faridmacadato43569 ай бұрын
@@benixal i tried the solution #1 and it still doesnt work. By the way i am using wamp64 as a virtual machine server. Acutally i do have an actual server at cloudways and when I use the php artisan tinker there it generates the keys. Is it okay to use that keys on my local development?
@benixal9 ай бұрын
Yes, it's okay to use the keys generated on your Cloudways server
@mybestclips1118 Жыл бұрын
Very very good. This is the best push notification teaching