adedaramola / laravel-termii
A Laravel Package to work with Termii API
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/adedaramola/laravel-termii
Requires
- php: ^8.1
- illuminate/contracts: ^9.25|^10.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- laravel/pint: ^1.13
- orchestra/testbench: ^8.12
- phpunit/phpunit: ^10.4
This package is auto-updated.
Last update: 2025-10-11 03:21:36 UTC
README
Installation
You can install the package via composer:
composer require adedaramola/laravel-termii
You can publish the config file with:
php artisan vendor:publish --tag="termii-config"
Set up
To start using this package, you need to add environment variables for:
- TERMII_URL- Optional, not really needed as this has a default
- TERMII_API_KEY- You can get this from your Termii dashboard.
The package will pick these up in its configuration and use these when it resolves an instance of the TermiiClient.
Usage
This package can be used by injecting the Adedaramola\Termii\Http\TermiiClient into a method to instantiate the client:
<?php declare(strict_types=1); namespace App\Http\Controllers; use Adedaramola\Termii\Contracts\TermiiClientContract; class SendOtpController extends Controller { public function __construct( private TermiiClientContract $termiiClient, ) {} public function store() { $this->termiiClient->token()->sendToken(); } }
Alternatively you can use the Termii Facade to help you:
declare(strict_types=1); Termii::token()->sendToken();