PHPackages                             hosomikai/kotsms - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. hosomikai/kotsms

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hosomikai/kotsms
================

Send sms use kotsms service - Laravel 5 version

1.1.1(4y ago)11.3k1MITPHPPHP ^7.0|^8.0

Since Aug 3Pushed 4y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Kotsms 簡訊王非官方 Laravel 發送簡訊 API
==============================

[](#kotsms-簡訊王非官方-laravel-發送簡訊-api)

Requirement for laravel 5.6 - 8.x
---------------------------------

[](#requirement-for-laravel-56---8x)

#### PHP &gt;= 7

[](#php--7)

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

[](#installation)

Via Composer

### 1. Require the Package

[](#1-require-the-package)

```
$ composer require hosomikai/kotsms

```

### 2. Set up env `.env`

[](#2-set-up-env-env)

```
KOTSMS_USERNAME="your username"
KOTSMS_PASSWORD="your password"

```

如果你想載入demo範例 `config/app.php`

```
'providers' => [
    ...
    Hosomikai\Kotsms\KotsmsDemoServiceProvider::class,
]

```

設定完成後瀏覽 `http://localhost:8000/test/kotsms`

如果你要接收簡訊王發送簡訊後的結果

```
KOTSMS_RETURN_URL="your url for accepts kotsms request after send sms"

```

Usage
-----

[](#usage)

### 1. 發送簡訊

[](#1-發送簡訊)

```
use Kotsms;

...
    $content = 'hello world!';   //發送內容
    $smsNumber = '0911123456';   //發送對象手機號碼

    $costPoints = Kotsms::countAmount($content);    //試算此封簡訊會花費多少點數

    //發送簡訊
    $response = Kotsms::to($smsNumber)
                    ->content($content)
                    ->send();

    $response->isSuccess();     //是否成功
    $response->getMessage();    //回傳成功或錯誤訊息
    $response->toArray();

```

toArray格式：

```
//成功
[
    'value' => 'kmsgid',
    'message' => '成功',
    'success' => true,
];

//失敗
[
    'value' => '-60002',
    'message' => '您帳戶中的點數不足',
    'success' => false,
];

```

### 2. 查詢點數

[](#2-查詢點數)

```
use Kotsms;

...

//剩餘點數
$points = Kotsms::queryUserPoints();

```

### 3. 查詢簡訊發送狀態

[](#3-查詢簡訊發送狀態)

```
use Kotsms;
...
    $reposnse = Kotsms::queryStatus($kmsgid);

    if ($response->isSuccess()) {
        //成功
    } else {
        //失敗
    }

```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

TODO
----

[](#todo)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

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 ~1036 days

Total

2

Last Release

1800d ago

### Community

Maintainers

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

---

Top Contributors

[![HosomiKai](https://avatars.githubusercontent.com/u/5814018?v=4)](https://github.com/HosomiKai "HosomiKai (44 commits)")

---

Tags

smskotsms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hosomikai-kotsms/health.svg)

```
[![Health](https://phpackages.com/badges/hosomikai-kotsms/health.svg)](https://phpackages.com/packages/hosomikai-kotsms)
```

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[nutnet/laravel-sms

Package for sending SMS form your Laravel app, includes pre-installed sms providers and your custom.

2526.6k](/packages/nutnet-laravel-sms)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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