PHPackages                             areeb-malik/sms-boiler-plate - 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. areeb-malik/sms-boiler-plate

ActivePackage

areeb-malik/sms-boiler-plate
============================

A basic template for sms.

001PHP

Since Jan 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/CC-Areeb/sms)[ Packagist](https://packagist.org/packages/areeb-malik/sms-boiler-plate)[ RSS](/packages/areeb-malik-sms-boiler-plate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SMS template
============

[](#sms-template)

**Composer command**

```
composer require areeb-malik/sms-boiler-plate

```

**Publishing the configurations**

```
php artisan vendor:publish --tag=CC-SMS

```

**Installation command**

```
php artisan install:sms

```

---

Environment Variables
---------------------

[](#environment-variables)

To run this project, you will need to add the following environment variables to your .env file

`TWILIO_ACCOUNT_SID`

`TWILIO_AUTH_TOKEN`

`TWILIO_SENDER`

### After setting the environment variables, you can start your local development server and start sending sms by just clicking on the send button.

[](#after-setting-the-environment-variables-you-can-start-your-local-development-server-and-start-sending-sms-by-just-clicking-on-the-send-button)

Code snippets
-------------

[](#code-snippets)

#### You can send OTP numbers in your sms

[](#you-can-send-otp-numbers-in-your-sms)

```
class SmsController extends Controller
{
    public function index()
    {
        return view('sms.index');
    }

    public function sendSMS()
    {
        $otp = $this->generateOTP(5);

        $request = (object) [
            'sms_message' => 'Text message with OTP: '. $otp,
            'sms_receiver' => '',
        ];

        try {
            $sid = config('sms.sid', 'some_sid');
            $sender = config('sms.sender', 'some_sender');
            $authToken = config('sms.auth', 'some_token');
            $twilio = new Client($sid, $authToken);
            $twilio->messages->create(
                $request->sms_receiver,
                [
                    "body" => $request->sms_message,
                    "from" => $sender,
                    "mediaUrl" => ["https://demo.twilio.com/owl.png"]
                ]
            );
            return 'SMS was sent';
        } catch (TwilioException $e) {
            throw $e;
        }
    }

    public function generateOTP($otpDigits)
    {
        return rand(pow(10, $otpDigits-1), pow(10, $otpDigits)-1);
    }
}

```

#### More examples

[](#more-examples)

****

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8d36c6edd10184bb8b0eafdbf186b64980fe2373ad110728bcfbc0eeb560bfa?d=identicon)[Muhammad Areeb Malik](/maintainers/Muhammad%20Areeb%20Malik)

---

Top Contributors

[![CC-Areeb](https://avatars.githubusercontent.com/u/96907614?v=4)](https://github.com/CC-Areeb "CC-Areeb (14 commits)")

### Embed Badge

![Health badge](/badges/areeb-malik-sms-boiler-plate/health.svg)

```
[![Health](https://phpackages.com/badges/areeb-malik-sms-boiler-plate/health.svg)](https://phpackages.com/packages/areeb-malik-sms-boiler-plate)
```

PHPackages © 2026

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