Laravel Push Notifications End to End Implementation (Web and Mobile)

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 73

  • @AdbhutIncident
    @AdbhutIncident 6 месяцев назад +1

    thanks brother, you saved me.

    • @eraufi
      @eraufi  6 месяцев назад

      Glad I could help

  • @jectionjection5786
    @jectionjection5786 7 месяцев назад +1

    Hey, You can make video related with complete Authentication and Authorization API with role admin and user in laravel

    • @eraufi
      @eraufi  7 месяцев назад +1

      i will try. i will add this comment in to my todo list

  • @kodoku169
    @kodoku169 3 месяца назад

    Thanks for sharing.

    • @eraufi
      @eraufi  3 месяца назад

      Thanks for watching!

  • @kayanibrahem-x6t
    @kayanibrahem-x6t 4 месяца назад

    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
      @eraufi  4 месяца назад

      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
    @ngocthachho4525 4 месяца назад

    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
      @eraufi  4 месяца назад

      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
      @gerritvanweele4045 3 месяца назад

      @@eraufi on my iphone i use safari thats not working

  • @jerrym2mmh
    @jerrym2mmh 3 месяца назад

    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
      @eraufi  3 месяца назад

      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

  • @MafumuMumba
    @MafumuMumba 3 месяца назад

    i'm getting this error in development: local.ERROR: Unable to create the local key.

    • @eraufi
      @eraufi  3 месяца назад +1

      are you using http or https?

    • @MafumuMumba
      @MafumuMumba 3 месяца назад

      @@eraufi i'm using '127.0.0.1:8000'

    • @MafumuMumba
      @MafumuMumba 3 месяца назад

      i'm using this -> '127.0.0.1:8000'

    • @MafumuMumba
      @MafumuMumba 3 месяца назад +1

      @@eraufi I have manged to resolve this by installing openSSL on windows and not just PHP

    • @eraufi
      @eraufi  3 месяца назад

      @@MafumuMumba thanks for giving the solution.

  • @TamerHamada
    @TamerHamada 2 месяца назад

    I have problam in --> $webPush->sendOneNotification ---> the error : Unable to create the local key.

    • @eraufi
      @eraufi  2 месяца назад

      are you using http or https?

    • @TamerHamada
      @TamerHamada 2 месяца назад

      Https with laragon i do all things

    • @eraufi
      @eraufi  2 месяца назад

      @@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
      @TamerHamada 2 месяца назад

      I do it i'm sure
      And i do it now again
      Still the problam

    • @eraufi
      @eraufi  2 месяца назад

      @@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

  • @jelajahmania
    @jelajahmania 3 месяца назад +1

    "Unable to create the local key" how to fix

    • @eraufi
      @eraufi  3 месяца назад

      please check 15:33 in there i explained how to generate public and private keys

    • @ramadhanchannel3110
      @ramadhanchannel3110 3 месяца назад

      Same with me even though I have already generated public key and private key

    • @eraufi
      @eraufi  3 месяца назад

      @@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
      @bigbangz 3 месяца назад

      How were you able to solve this?

    • @MafumuMumba
      @MafumuMumba 3 месяца назад

      I'm currently facing the same error when using the local host url

  • @hackeranonymous9513
    @hackeranonymous9513 3 месяца назад

    is this paid plans or free

    • @eraufi
      @eraufi  3 месяца назад

      it's fully free