Laraship

  1. Home
  2. Docs
  3. Laraship
  4. Customize Laraship
  5. Webhooks Handler

Webhooks Handler

If your application requires webhooks to accept requests from external applications, then we have our Webhook Handler ready for you, which will make webhooks receiving more stable, manageable, and easier to monitor!

Also, the processing can be asynchronous using the Laravel queue, and even if you run into an issue with the webhook processing you can reprocess it.

 

for example, if you need to create a webhook to accept order status changes from a shipping carrier here is what we need to do:

 

  1. let’s assume the event name is Order Update the request should be sent to the following endpoint as POST:

{domain}/utilities/webhooks/{event_name} and in our example  https://websiite.com/utilities/webhooks/update-order

And YourModule namespace is mymodule

 

2. Under YourModule config.php add the webhooks configuration:

 

 

3. Under Your Module Service Provider add the following code “$this->registerWebhooks();” to the boot function, and register your webhooks

 

4. Create Your Job class that will handle the webhook data and process it under Corals\Modules\MyModule\Jobs\HandleOrderUpdated.php

 

 

70% OFF

No Minimum, No Exceptions
 
GO TO STORE
close-link