Download the PHP package 101media/bird without Composer

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

image

Bird.com API Support for Laravel

  1. Introduction
    • Why This Package?
  2. Installation
    • Prerequisites
    • Step-by-Step Installation
  3. Configuration
  4. Usage
    • 1. Contact Management
      • Retrieve Contacts
      • Retrieve a Single Contact
      • Create or Update Contacts
      • Delete Contacts
      • Contact Model Overview
    • 2. Sending Notifications
      • Supported Notification Channels
      • Example: Sending SMS Notifications
  5. Exception Handling
  6. Contributing
  7. License
  8. Contact

Overview

The Laravel Bird Package simplifies integrating the powerful MessageBird API into your Laravel applications. It provides a user-friendly way to manage contacts and send notifications via SMS, WhatsApp, email, and more. This package is designed to make communication between Laravel and Bird (AKA MessageBird) seamless and efficient.

Why This Package?

Installation

Prerequisites

Before installing this package, ensure your system meets the following requirements:

Step-by-Step Installation

  1. Add the package to your Laravel project using Composer:

  2. Once installed, the package will automatically register the BirdServiceProvider using Laravel's package auto-discovery.
  3. Run the following command to publish the package configuration:

    This will create a config/bird.php file in your application.

Configuration

The config/bird.php file contains all configurable options, including:

For detailed configuration options, refer to the comments within the config/bird.php file.

Usage

1. Contact Management

This package provides functionality for managing contacts via the Bird API. Below are the key actions you can perform with the ContactService.

Retrieve Contacts

You can retrieve a list of contacts using the index() method. This allows you to specify the number of contacts to retrieve and whether to reverse the order of the results. To be able to retrieve the contacts, make sure you have specified your BIRD_WORKSPACE_ID in you .env file.

Parameters:

Retrieving a single contact

You can also retrieve a single contact using the show() method. This allows you to get only one contact by specifying its id.

Parameters:

Create or Update Contacts

You can create or update a contact by passing a Contact object to the createOrUpdate() method. This method requires the contact's identifier (phone number or email address) to determine whether to create a new contact or update an existing one.

Parameters:

Delete Contacts

To delete a contact, simply call the delete() method with the contact's ID.

Parameters:

Return Values:


Contact Model Overview

The Contact model provides an easy-to-use interface for building and manipulating contact records before sending them to the Bird API.

Example Contact Creation
Contact Methods:

Ensure to validate the phone number using the regex defined in the configuration (bird.phone_number_regex) before sending it to the API.


2. Sending Notifications

This package supports a variety of notification channels, including SMS, WhatsApp, email, and more. Below are the details on using the SMS channel for sending notifications, leveraging predefined templates, and handling advanced use cases.

Supported Notification Channels

Currently, we only support the SMS channel. This is not going to be the case soon though, as we are planning on adding support for WhatsApp, facebook and telegram notification channels.

Example: Sending SMS Notifications

The SMSChannel allows you to send SMS notifications by leveraging Laravel notification system. Make sure you are allowed to send SMS notifications using Bird. You need to configure an SMS channel before you can send SMS notifications.

Notification Class Example

Define a custom notification class implementing the toSMS method.

Sending the Notification

You can send the notification using Laravel's Notification facade or the notify method.

Exception Handling

The package uses custom exceptions to handle errors:

Make sure to catch these exceptions in your code to handle errors gracefully.

Contributing

Please submit issues and pull requests to the GitHub repository.

License

This package is open-sourced software licensed under the MIT license.

Contact

For any inquiries or support, please contact 101Media.


All versions of bird with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0
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 101media/bird contains the following files

Loading the files please wait ....