PHPackages                             textlk/textlk-laravel - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. textlk/textlk-laravel

ActiveLibrary[HTTP &amp; Networking](/categories/http)

textlk/textlk-laravel
=====================

Text.lk - SMS Gateway Sri Lanka

v1.1.0(4mo ago)2862[1 PRs](https://github.com/textlk/textlk-laravel/pulls)MITPHP

Since Feb 5Pushed 4mo agoCompare

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

READMEChangelog (10)Dependencies (1)Versions (24)Used By (0)

TextLK Laravel SMS Package
==========================

[](#textlk-laravel-sms-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/66974bd13598d98e06fac687467899d50b6014e3b7fe5570d0c8234fb491148c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746578746c6b2f746578746c6b2d6c61726176656c2e737667)](https://packagist.org/packages/textlk/textlk-laravel)[![Total Downloads](https://camo.githubusercontent.com/8870d50f93d3218cb003c5c0f84fdf8b5889b3ab093c11d460a86c5c45ee638e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746578746c6b2f746578746c6b2d6c61726176656c2e737667)](https://packagist.org/packages/textlk/textlk-laravel)[![License](https://camo.githubusercontent.com/ca57de605797586fc4f0b41a98ef7f525bcac76acacc289cd9f1d52ad0f7f6e8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746578746c6b2f746578746c6b2d6c61726176656c2e737667)](https://packagist.org/packages/textlk/textlk-laravel)

Official Laravel / PHP SDK for sending SMS via **Text.lk** 🚀

[![PHP Version](https://camo.githubusercontent.com/cb99240e5a3572f0be80d5b2742f242f1b411d53107182ce935db0626da137c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746578746c6b2f746578746c6b2d6c61726176656c)](https://camo.githubusercontent.com/cb99240e5a3572f0be80d5b2742f242f1b411d53107182ce935db0626da137c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746578746c6b2f746578746c6b2d6c61726176656c)[![Laravel](https://camo.githubusercontent.com/d51b8e79975be90e24c693ba81d5421e6c6f8243929cc73d6243d7ea364fdb4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d436f6d70617469626c652d726564)](https://camo.githubusercontent.com/d51b8e79975be90e24c693ba81d5421e6c6f8243929cc73d6243d7ea364fdb4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d436f6d70617469626c652d726564)

Easily integrate Text.lk SMS services into your Laravel or PHP applications.

---

✨ Features
----------

[](#-features)

- Send SMS messages via Text.lk API
- Supports **single &amp; multiple recipients**
- Plain text SMS support
- Scheduled SMS support
- Check account balance
- Fetch account profile
- Lightweight &amp; simple API

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require textlk/textlk-laravel
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Get your API Key

[](#1-get-your-api-key)

Login to your **Text.lk Dashboard** and generate an API key.

### 2. Laravel Environment (.env)

[](#2-laravel-environment-env)

Add your API key to `.env`:

```
TEXTLK_API_KEY=your_api_key_here
```

---

🚀 Usage
-------

[](#-usage)

### Laravel Example

[](#laravel-example)

```
use TextLK\SMS;

$SMS = new SMS(config('services.textlk.api_key'));

$data = [
    "recipient" => "9476000000", // or "+9476000000,+9476111000"
    "sender_id" => "TEXTLK",
    "type" => "plain",
    "message" => "Boom! Message from Text.lk"
    // "schedule_time" => "2021-12-20T07:00:00Z"
];

$response = $SMS->send($data);

return $response;
```

---

🧪 Plain PHP Example (example.php)
---------------------------------

[](#-plain-php-example-examplephp)

```
