PHPackages                             creatvstudio/itexmo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. creatvstudio/itexmo

ActiveLibrary[API Development](/categories/api)

creatvstudio/itexmo
===================

iTexMo API client for PHP.

v0.2.4(5y ago)12011MITPHPPHP ^7.1CI failing

Since Apr 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/CreatvStudio/itexmo)[ Packagist](https://packagist.org/packages/creatvstudio/itexmo)[ Docs](https://github.com/creatvstudio/itexmo)[ RSS](/packages/creatvstudio-itexmo/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (9)Used By (1)

iTexmo
======

[](#itexmo)

[![Latest Stable Version](https://camo.githubusercontent.com/11ed6771ea88ad4d2637d7b775c72b9c2b71e74acb254bfd82a46b088873d7d8/68747470733a2f2f706f7365722e707567782e6f72672f63726561747673747564696f2f697465786d6f2f762f737461626c65)](https://packagist.org/packages/creatvstudio/itexmo)[![Total Downloads](https://camo.githubusercontent.com/3dfdf8607edba77fb42c4c678e06b52dca7517eb904e419c9bcb5ac2ef71146f/68747470733a2f2f706f7365722e707567782e6f72672f63726561747673747564696f2f697465786d6f2f646f776e6c6f616473)](https://packagist.org/packages/creatvstudio/itexmo)[![License](https://camo.githubusercontent.com/295c42fa50b33345225ecdfac5f3d285e2ddb5ad884707c7585230bbef1980f3/68747470733a2f2f706f7365722e707567782e6f72672f63726561747673747564696f2f697465786d6f2f6c6963656e7365)](https://packagist.org/packages/creatvstudio/itexmo)

iTexMo API client for PHP.

Requirements
------------

[](#requirements)

To use the client library you'll need to have created an iTexmo account.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require creatvstudio/itexmo
```

Usage
-----

[](#usage)

```
use \CreatvStudio\Itexmo\Itexmo::class;

$itexmo = new Itexmo($apiCode);

// Send with our expressive API
$itexmo->to('09171234567')->content('Hello fellow humans!')->send();

// or just use a plain array
$itexmo->send([
    'to' => '09171234567',
    'content' => 'Hello fellow humans!',
]);

// Custom Sender ID
$itexmo->sender('MY-SENDER')->send();
```

### Laravel

[](#laravel)

Add ItexmoServiceProvider to your config.

```
# config/app.php

'providers' => [
    ...

    /*
     * Package Service Providers...
     */

    ...

    CreatvStudio\Itexmo\ItexmoServiceProvider::class,
]
```

Add your Itexmo credentials to `config/services.php` and `.env` file.

```
# config/services.php

...

'ses' => [
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],

'itexmo' => [
    'code' => env('ITEXTMO_CODE'),
    'password' => env('ITEXMO_PASSWORD'),
    'sender_id' => env('ITEXMO_SENDER_ID'),
]
```

If you want to use the `Itexmo` Facade you can also add the alias to your config.

```
# config/app.php

'aliases' => [
    ...

    'Itexmo' => CreatvStudio\Itexmo\Facades\Itexmo::class,

]
```

Now you can just use the Facade to send SMS. Your `API Code` and `API Password` will be automatically injected to the `Itexmo` object.

```
Itexmo::to('09171234567')->content('Hello fellow humans!')->send();
```

### Dependency Injection

[](#dependency-injection)

You can also use Laravel's dependecy injection to your controllers or commands.

```
