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
@eraufi
16 күн бұрын
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
@jectionjection5786
5 ай бұрын
Hey, You can make video related with complete Authentication and Authorization API with role admin and user in laravel
@eraufi
5 ай бұрын
i will try. i will add this comment in to my todo list
@kayanibrahem-x6t
2 ай бұрын
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"
@eraufi
2 ай бұрын
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
@ngocthachho4525
2 ай бұрын
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!
@eraufi
2 ай бұрын
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
@gerritvanweele4045
Ай бұрын
@@eraufi on my iphone i use safari thats not working
@MafumuMumba
23 күн бұрын
i'm getting this error in development: local.ERROR: Unable to create the local key.
@eraufi
23 күн бұрын
are you using http or https?
@MafumuMumba
23 күн бұрын
@@eraufi i'm using '127.0.0.1:8000'
@MafumuMumba
23 күн бұрын
i'm using this -> '127.0.0.1:8000'
@MafumuMumba
22 күн бұрын
@@eraufi I have manged to resolve this by installing openSSL on windows and not just PHP
@eraufi
22 күн бұрын
@@MafumuMumba thanks for giving the solution.
@jelajahmania
Ай бұрын
"Unable to create the local key" how to fix
@eraufi
Ай бұрын
please check 15:33 in there i explained how to generate public and private keys
@ramadhanchannel3110
Ай бұрын
Same with me even though I have already generated public key and private key
@eraufi
Ай бұрын
@@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.
@bigbangz
23 күн бұрын
How were you able to solve this?
@MafumuMumba
23 күн бұрын
I'm currently facing the same error when using the local host url
Пікірлер: 31