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
@eraufi14 күн бұрын
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
@jectionjection57865 ай бұрын
Hey, You can make video related with complete Authentication and Authorization API with role admin and user in laravel
@eraufi5 ай бұрын
i will try. i will add this comment in to my todo list
@kayanibrahem-x6tАй бұрын
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Ай бұрын
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
@MafumuMumba21 күн бұрын
i'm getting this error in development: local.ERROR: Unable to create the local key.
@eraufi21 күн бұрын
are you using http or https?
@MafumuMumba21 күн бұрын
@@eraufi i'm using '127.0.0.1:8000'
@MafumuMumba21 күн бұрын
i'm using this -> '127.0.0.1:8000'
@MafumuMumba21 күн бұрын
@@eraufi I have manged to resolve this by installing openSSL on windows and not just PHP
@eraufi21 күн бұрын
@@MafumuMumba thanks for giving the solution.
@ngocthachho45252 ай бұрын
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!
@eraufi2 ай бұрын
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
@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.
@bigbangz21 күн бұрын
How were you able to solve this?
@MafumuMumba21 күн бұрын
I'm currently facing the same error when using the local host url