PHPackages                             woenel/laravel-txtbox - 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. woenel/laravel-txtbox

ActiveLibrary

woenel/laravel-txtbox
=====================

TxtBox API for Laravel.

v2.0.4(3y ago)38141MITPHPPHP ^7.2|^8.0CI failing

Since Apr 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/woenel/laravel-txtbox)[ Packagist](https://packagist.org/packages/woenel/laravel-txtbox)[ RSS](/packages/woenel-laravel-txtbox/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (12)Used By (0)

Laravel TxtBox
==============

[](#laravel-txtbox)

[TxtBox](https://www.txtbox.com/) SMS API for Laravel.

[![Packagist Version](https://camo.githubusercontent.com/23f3a900660e2bb8b5bfa3e4d003af545fc70c91de764d6c3ccc8675ffe7ee2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f656e656c2f6c61726176656c2d747874626f78)](https://camo.githubusercontent.com/23f3a900660e2bb8b5bfa3e4d003af545fc70c91de764d6c3ccc8675ffe7ee2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f656e656c2f6c61726176656c2d747874626f78)[![Packagist](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)

What is TxtBox
--------------

[](#what-is-txtbox)

Txtbox lets you send an SMS with a single line of code. No complicated setup, no dealing with telecom protocols and procedures.

For more info, you can visit their website at:

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

[](#requirements)

- PHP: 7.2.x and up or 8.0.x
- Laravel: 8.x.x or 9.x.x (For Laravel 7.x.x, use version [1.x.x](https://github.com/woenel/laravel-txtbox/releases))
- [TxtBox API Key](https://www.txtbox.com)

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

[](#installation)

Install using Composer

```
For Laravel 8:
$ composer require woenel/laravel-txtbox

For Laravel 7:
$ composer require woenel/laravel-txtbox "^1.3"

```

Publish the config file named `txtbox.php` and set the TxtBox API key.

```
$ php artisan vendor:publish --provider="Woenel\TxtBox\TxtBoxServiceProvider"

```

Usage
-----

[](#usage)

### Send a Message

[](#send-a-message)

These are the three methods you can use to send a message:

###### 1. Using facade

[](#1-using-facade)

```
use Woenel\TxtBox\Facades\TxtBox;

$result = TxtBox::to('09123456789')->message('Hello World!')->send();

if($result->success) {
  echo $result->message;
} else {
  echo $result->message;
}

```

###### 2. Instantiating class (chaining)

[](#2-instantiating-class-chaining)

```
use Woenel\TxtBox\TxtBox;

$txtbox = new TxtBox;

$result = $txtbox->to('09123456789')->message('Hello World!')->send();

if($result->success) {
  echo $result->message;
} else {
  echo $result->message;
}

```

###### 3. Instantiating class (one-by-one)

[](#3-instantiating-class-one-by-one)

```
use Woenel\TxtBox\TxtBox;

$txtbox = new TxtBox;

$txtbox->to = '09123456789';
$txtbox->message = 'Hello World!';
$result = $txtbox->send();

if($result->success) {
  echo $result->message;
} else {
  echo $result->message;
}

```

Success and Failure returns
---------------------------

[](#success-and-failure-returns)

TxtBox Laravel API returns object-type values.

### Success

[](#success)

**Message successfully sent to 09XXXXXXXXX**
This happens when you successfully sent a message.

```
{
  "success": true,
  "message": 'Message successfully sent to 09XXXXXXXXX'
}

```

### Failures

[](#failures)

**Invalid Token**
This happens when you did not provide a valid API key. API key can be modified in `txtbox.php` file under `config` folder.

```
{
  "success": false,
  "message": 'Invalid Token'
}

```

**Unprocessable Entity**
This happens when you did not enter a value. **Number** `to()` and **Message** `message()` are both required entities.

```
{
  "success": false,
  "message": 'Unprocessable Entity',
  "errors": {
    "number": [
      0 => 'The message field is required.'
    ],
    "message": [
      0 => 'The number field is required.'
    ]
  }
}

```

**Insufficient credits. Please buy more credit to use this service.**
This happens when you already used all of your SMS credits.

```
{
  "success": false,
  "message": 'Insufficient credits. Please buy more credit to use this service.'
}

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~87 days

Recently: every ~176 days

Total

11

Last Release

1334d ago

Major Versions

v1.2 → v2.02020-10-13

PHP version history (3 changes)v1.0PHP ^7.2.5

v2.0.2PHP ^7.2|8.0

v2.0.3PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea4479858c97e8df1544a07737dde16550f1c51173ca21290d77e4afe8c1b0be?d=identicon)[woenel](/maintainers/woenel)

---

Top Contributors

[![woenel](https://avatars.githubusercontent.com/u/8844488?v=4)](https://github.com/woenel "woenel (30 commits)")

### Embed Badge

![Health badge](/badges/woenel-laravel-txtbox/health.svg)

```
[![Health](https://phpackages.com/badges/woenel-laravel-txtbox/health.svg)](https://phpackages.com/packages/woenel-laravel-txtbox)
```

###  Alternatives

[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
