Download the PHP package citricguy/postmark-webhooks-laravel without Composer

On this page you can find all versions of the php package citricguy/postmark-webhooks-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package postmark-webhooks-laravel

Postmark Webhooks for Laravel

You're looking for an easy to implement package, that accepts webhooks from PostmarkApp.com. This package does just that.

This no-frills solution provides a simple api to accept webhooks from PostmarkApp.com and then fire an event that you can listen for in your application.

There are no added migrations, no models, only a single event that you can listen for and then do whatever you want with the payload.

It is configurable, easy to use and utilizes middleware to ensure the webhooks are coming from PostmarkApp.com.

Because we're starting fresh and trying to keep this as maintainable and reliable as possible, we're using the latest version of Laravel and PHP.

Requirements

Installation

You can install this package using composer:

Configure webhooks in your Postmark account

On the servers page of your Postmark account choose the server and stream you would like to receive webhooks from.

Once there, go to 'settings' -> 'webhooks' -> 'add webhook'.

Add your webhook URL which is https://<your-domain.com>/api/postmark/webhook by default (this is configurable).

Select the events Postmark should send to your webhook and then save.

Event Configuration

Listening for the PostmarkWebhookReceived event is the primary way we'll interact with the webhooks.

If you haven't used events or listener before, please see the laravel documentation regarding events.

In short, we'll create a listener, register it in our EventServiceProvider and then handle the event in our listener.

Here is an example listener:

Advanced Configuration

Though not necessary, if you would like to configure the webhook's path, basic-auth or disable the auth middleware you can publish the config file.

You can change your settings in that config, or use your .env file instead if you prefer.

The following .env values are available:

About the Firewall

By default, the firewall is disabled unless you are in a 'production' environment. (i.e. APP_ENV=production).

The middleware will do 'basic-auth' if configured. To use this feature, you will need to configure your Postmark webhook to include Basic auth credentials by configuring your wehbook on PostmarkApp.com.

Finally, you will need to set up your .env file:

The middleware also confirms the source of the webhook is from PostmarkApp.com. This is done by checking the IP address of the request against the list of IP addresses provided by PostmarkApp.com.

To disable the firewall, set POSTMARK_WEBHOOK_FIREWALL_ENABLED=false in your .env file or simply be in any environment except for production.

Testing

Credits

This project was inspired by Laravel Postmark Webooks and is a simpler alternative without any added models or migrations. It also allows for basic-auth webhook integration with PostmarkApp while trying to keep up with current versions of Laravel and PHP.

License

The MIT License (MIT). Please see License File for more information.


All versions of postmark-webhooks-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package citricguy/postmark-webhooks-laravel contains the following files

Loading the files please wait ....