Download the PHP package parables/arkesel-sdk without Composer

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

Arkesel SDK

Latest Version on Packagist Build Status StyleCI SymfonyInsight Quality Score Code Coverage Total Downloads

Contents

About

This is an unofficial SDK for Arkesel which is a wrapper around [Arkesel API] for PHP and Laravel applications.

Features

This SDK includes a Laravel Notification channel that makes it possible to send out Laravel notifications as a SMS using Arkesel API

Installation

You can install this package via composer:

The service provider gets loaded automatically.

Then publish the config file

Setting up the Arkesel service

First, create Sign up for an account. You will be taken to your SMS Dashboard where you can find the SMS API keys.

Then add your API key to the .env file

The following env variables can be used to customize the package. Refer to the Arkesel Docs for more info

Usage

Bulk SMS

Notifications to the arkesel channel

Create a notification class. Refer to Laravel's documentation on Notifications.

  1. Add the Notifiable trait to your model

  2. Create a Notification

    Then specify the channel with the via() method and the message to be sent using the toArkesel($notifiable) method

  3. Send the notification

SMS Recipients

For on-demand notifications, recipients are directly passed to the Notification::route method.

For all other cases, it is highly recommend to be explicit about specifying the recipients of your notification using the recipients() method on the ArkeselMessageBuilder instance or ArkeselSms instance/facade/helper function

However, you may want to return a string as the sms message for the toArkesel($notifiable) method.

In such cases, please make sure to define a routeNotificationForArkesel($notification) method which will receive the Notification instance $notification being sent on your notifiable class and return a comma-separated string or an array of string of phone numbers.

This ensures that the package doesn't attempt to figure out the recipients.

If a routeNotificationForArkesel($notification) method is not defined in your notifiable class, this package will attempt to get the recipients using any of these methods or properties defined on the notifiable class in the following order of preference.

TL'DR: it prefers:

  1. a plural method over a singular method
  2. a plural property over a singular property
  3. a camelCased property over a snake_case property

with these specific names: routeNotificationForArkesel, recipients, recipient, phoneNumbers, phone_numbers, phoneNumber, phone_number

Under the hood, it uses the code snippets below to decide how to get the recipients:

This is the order of preference to get the recipients:

Notice that all the methods above receives the Notification instance $notification being sent.

If there is none of these methods or properties is defined, it will throw an exception: ArkeselSmsBuilderException: 'No recipients were specified for this sms'

Composing SMS

You can fluently compose the SMS by chaining the setter methods exposed by the ArkeselMessageBuilder;

Available methods

ArkeselMessageBuilder

ArkeselSms

The ArkeselSms class it used to send the SMS and get the SMS balance.

FAQ

ArkeselChannel

The ArkeselChannel class exposes the send methods to send notifications.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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


All versions of arkesel-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 parables/arkesel-sdk contains the following files

Loading the files please wait ....