hexonthebeach / laravel-cmtext-provider
CM.com TextClient in a Laravel Service Provider.
Installs: 436
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/hexonthebeach/laravel-cmtext-provider
Requires
- cmdotcom/text-sdk-php: ^2.0
This package is auto-updated.
Last update: 2025-09-29 02:03:11 UTC
README
Service provider to inject the CMText\TextClient
requirements
- laravel 5
setup
- Load this package in to your project
composer require hexonthebeach/laravel-cmtext-provider
- Publish the enclosed config to config/cmtext.php
php artisan vendor:publish "hexonthebeach\LaravelCMTextProvider\CMTextProvider"
-
Add
CM_API_KEY
to the project .env file, the value should be your Api Key -
Finally add this service provider to the list of providers in the config/app.php file
'providers' => [ ... , hexonthebeach\LaravelCMTextProvider\CMTextProvider::class, ],
code example
<?php namespace App\Http\Controllers; use CMText\TextClient; class CMTextController extends Controller { public function index(TextClient $textClient) { $textClient->SendMessage( ... ); } }