Download the PHP package asseco-voice/laravel-inbox without Composer

On this page you can find all versions of the php package asseco-voice/laravel-inbox. 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 laravel-inbox

Laravel inbox

Purpose of this package is to provide pattern-matching for incoming communication and executing custom callbacks if they match.

Credits to BeyondCode for the initial codebase. The idea for this package later on substantially diverged from the original, leaving no alternative than to separate it as a new package.

Installation

Require the package with composer require asseco-voice/laravel-inbox. Service provider will be registered automatically.

Usage

Interface

Before you start using the package, you need to have a class implementing a CanMatch interface so that package knows what will it validate regex against.

I.e. if you want to validate against 'from', you need to defined where to fetch that piece of information from.

Inbox API

Inbox is a class in which you provide regex patterns which you'd like to be matched before the given callback is executed.

I.e. the callback defined under action() will execute only if the .*@gmail.com pattern is matched:

Patterns need to be surrounded within { }.

Inbox group API

Should you require multiple cases covered, there is also a higher level concept - InboxGroup which acts as a container for multiple inboxes, having a few fluent API methods as well.

More examples

Examples will cover cases using mail, but it can be adapted to any incoming communication.

Matching functions can be used to either provide an exact match (i.e. from('[email protected]')) or providing a regex match which needs to be surrounded with curly braces { } to be interpreted as such.

Example:

More examples with outcomes:

Group example:

If you don't want to use groups, but a single inbox, you can call run method on it directly:


All versions of laravel-inbox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0
zbateson/mail-mime-parser Version ^2.2
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 asseco-voice/laravel-inbox contains the following files

Loading the files please wait ....