Thank you for this wonderful explanation, but I am facing a problem and I do not know the reason. Is the problem in the version or what? im using laravel 11 and get this error "Unable to create the local key"
are you using HTTP or HTTPS? this will only work with HTTPS if you are using HTTPS, please watch 15:33 where i explain how to generate public and private keys
I tested the demo on your website, all web browsers on computers receive notifications, but all mobile devices using the browser do not receive any notifications, do you need to configure it? anything for mobile browsers? Thank you so much!
thanks for the comment i just tested in my computer and mobile using chrome browser in both (android phone) i received the notifications. maybe it's not allowed in your mobile settings. please check and let me know if that's the case
} Subscription::create give not data it give null in your video you write like this $notification->Subscriptions but in your code you write like this $notification['subscriptions'] but in my test all work but i don't get any data from Subscription::create please help me
first please check your pushNotification migration file the subscription should be json type. second please check your model that it should contain protected $casts = [ 'subscriptions' => 'array' ]; and third please check that are you save the subscriptions data to database. Note: please use HTTPS other wise it will not work
@@TamerHamada please use this package to create public and private key as I mentioned in 15:33 Generating Public and Private Keys. I just checked it and I was able to create the keys github.com/web-push-libs/web-push
@@TamerHamada could you please kindly give me some more details. because I just created public and private keys in my new laravel application and it worked fine. i want to create the same environment and test it to find the actual problem. or you can add your project on github and share the link with me so i can test it
@@ramadhanchannel3110 Thanks for pointing this out. maybe the packages are updated. I will check and keep you guys updated if there is anything new or if anything changed.
thanks brother, you saved me.
Glad I could help
Hey, You can make video related with complete Authentication and Authorization API with role admin and user in laravel
i will try. i will add this comment in to my todo list
Thanks for sharing.
Thanks for watching!
Thank you for this wonderful explanation, but I am facing a problem and I do not know the reason. Is the problem in the version or what? im using laravel 11 and get this error "Unable to create the local key"
are you using HTTP or HTTPS?
this will only work with HTTPS if you are using HTTPS, please watch 15:33 where i explain how to generate public and private keys
I tested the demo on your website, all web browsers on computers receive notifications, but all mobile devices using the browser do not receive any notifications, do you need to configure it? anything for mobile browsers? Thank you so much!
thanks for the comment i just tested in my computer and mobile using chrome browser in both (android phone) i received the notifications. maybe it's not allowed in your mobile settings.
please check and let me know if that's the case
@@eraufi on my iphone i use safari thats not working
can you help me my code doesn't work in this part
foreach ($notifications as $notification) {
$webPush->sendOneNotification(
Subscription::create($notification->subscriptions),
$payload,
['TTL' => 5000]
);
}
Subscription::create give not data it give null in your video you write like this $notification->Subscriptions but in your code you write like this $notification['subscriptions']
but in my test all work but i don't get any data from Subscription::create please help me
first please check your pushNotification migration file the subscription should be json type.
second please check your model that it should contain
protected $casts = [
'subscriptions' => 'array'
];
and third please check that are you save the subscriptions data to database.
Note: please use HTTPS other wise it will not work
i'm getting this error in development: local.ERROR: Unable to create the local key.
are you using http or https?
@@eraufi i'm using '127.0.0.1:8000'
i'm using this -> '127.0.0.1:8000'
@@eraufi I have manged to resolve this by installing openSSL on windows and not just PHP
@@MafumuMumba thanks for giving the solution.
I have problam in --> $webPush->sendOneNotification ---> the error : Unable to create the local key.
are you using http or https?
Https with laragon i do all things
@@TamerHamada please use this package to create public and private key as I mentioned in 15:33 Generating Public and Private Keys.
I just checked it and I was able to create the keys
github.com/web-push-libs/web-push
I do it i'm sure
And i do it now again
Still the problam
@@TamerHamada could you please kindly give me some more details. because I just created public and private keys in my new laravel application and it worked fine.
i want to create the same environment and test it to find the actual problem.
or you can add your project on github and share the link with me so i can test it
"Unable to create the local key" how to fix
please check 15:33 in there i explained how to generate public and private keys
Same with me even though I have already generated public key and private key
@@ramadhanchannel3110 Thanks for pointing this out. maybe the packages are updated. I will check and keep you guys updated if there is anything new or if anything changed.
How were you able to solve this?
I'm currently facing the same error when using the local host url
is this paid plans or free
it's fully free