Advanced Livewire: Abstracting notifications

By @samuel · 2021-10-18 19:32

Advanced Livewire: Abstracting notifications

  • By @yoeunes · 2021-10-24 18:57

    Hello great article here, but I think the 'Livewire::listen' part should be in a service provider boot method instead, that's much cleaner, and you do not have to call for every flash action

    • By @samuel · 2021-10-24 19:08

      should be in a service provider

      The article mentions that it can be there. But it goes to explain why it's placed inside the class instead — to make it self-registering.

      do not have to call for every flash action

      It doesn't. Note what static::$registered is used for in the code.

      • By @yoeunes · 2021-10-24 19:13

        Ah my bad I didn't spot that, yes you're right thanks. Great article, congrats