Download the PHP package condoedge/communications without Composer

On this page you can find all versions of the php package condoedge/communications. 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 communications

Communications

Concept of Working

This package provides a way to handle communications within your application. It allows you to set up triggers, manage variables, and enhance context for events. The main idea is to have a way to send communications to users based on events that happen in the application. For example, you could send an email to a user when they register, or when they buy a product.

It provides a route /communication-templates where you can edit/create the templates for the communications with variables and types of communications.

Steps to Use It

Installation

To install the package, run the following command:

Publishing configuration

To publish the configuration file, use the following command:

Publishing javascript (Needed for the CKeditor)

To publish the JavaScript files required for CKEditor, use the following command:

Setting communicables

Each kind of communications has their own interface to be implemented by the communicable model. For example, the EmailCommunicable model implements the EmailCommunicable interface. So if the communication is an email, the communicable model should implement the EmailCommunicable interface or it'll be ignored.

Our actual interfaces are:

Setting Up Triggers

To set up a trigger, you need to create an event that will trigger the communication. Below is an example of how to create a trigger event:

Next, set the communication triggers in the kompo-communications config file:

Introducing CKEditor

To implement CKEditor, use the _EnhancedEditor helper in your kompo component. In communications, it is used in the EmailCommunicationHandler to allow the user to write the email content with variables.

Using Variables in CKEditor

To see variables in the editor, set the variables as follows:

Replacing Content with Variables

The content will replace the variables in the text with the provided values. You can also use the automatic handling of the variables ({model.attribute}) for simple cases.

Enhancing Context for Events

You can enhance the context that you'll provide in the events. You can also implement the enhanceContext method in the model to do this, which is often a better approach.

or

Setting default communications for triggers

To set the default communications for each trigger, you can use the provided button on the list page. You need to configure the default communications for each trigger in the resources\views\stubs\communication-templates directory. The file structure should follow this format:

default-{slugged-name-of-the-trigger}-{number-of-type-of-communications}-{locale-key}.blade.php

For example: default-opened-reinscriptions-1-en.blade.php

The name of the trigger is given by $trigger::class.

Here's a breakdown of the numbering system for each type of communication:

Make sure to update the appropriate file for each trigger and communication type.

Sending communications ways

Email

We use the Laravel Mail facade to send emails. You should change the file communication-layout.blade.php to your email layout.

SMS

We use the vonage API to send SMS.

Database

We use the Laravel Notification system to send notifications with some enhancements to manage them. Giving the possibility to provide some custom notifications handlers.

Extending sending ways

We don't have an easy way to do this. We'll need a refactor for do CommunicationType enum setteable from a config file. Now it's static.

We have an specific handler for each type of communications. Implementing a different way to send communications, and save them. You should create a new handler and extends the AbstractCommunicationHandler class.


All versions of communications with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/framework Version >=5.6.0
kompo/kompo Version ^3.0
kompo/auth Version >=0.4.88
laravel/vonage-notification-channel Version ^3.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 condoedge/communications contains the following files

Loading the files please wait ....