blog-contest-may-mayhem icon indicating copy to clipboard operation
blog-contest-may-mayhem copied to clipboard

Laravel Innovations: Making your own webhook mechanism through notifications

Open peterfox opened this issue 6 years ago • 2 comments

https://medium.com/@SlyFireFox/laravel-innovations-making-your-own-webhook-mechanism-through-notifications-96e75e99a2b1

peterfox avatar May 31 '18 00:05 peterfox

Interesting use of notifications. What are the advantages of using this approach against a queued job that would call the API ?

RemiCollin avatar May 31 '18 20:05 RemiCollin

@RemiCollin little to none except it makes a much more clear structure for delivery. It separates the who, what and where into notifiable, notification and channel. You can easily do the same thing with dispatching a job but then if you want to change or expand on that job you'll end up creating another job to sit along side the other. I'm sure there will be a few pros and cons for both ways tbh.

I just know I like using custom Channels to solve a few problems like that.

peterfox avatar May 31 '18 20:05 peterfox