Laravel SMS and MMS Package for Sending Text Messages To Users Without needing a 3rd party API

dev-master 2019-01-22 17:24 UTC

This package is auto-updated.

Last update: 2024-05-23 05:21:07 UTC


Laravel Package To Send Text Messages To Major Phone Providers For Free


  1. composer require clean-code-studio/laravel-text-messages
  2. php artisan vendor:publish
  3. choose to publish this package
  4. php artisan migrate
  5. use CleanCodeStudio\LaravelTextMessages\Textable Trait on any model you want to text

Using Textable trait on User Model

use CleanCodeStudio\LaravelTextMessages\Textable;

class User extends Authenticatable
    use Textable;

#####Example Usage:

$user = App\User::create(['email' => '', 'password' => 'secret', 'name' => 'johnDoe']);

// register phone number to user

// then send a text message to the user
$user->text()->message('hello world'); 


Set sender address of text message :

  1. Go to config/textable.php
  2. Set the from property *Example: * config/textable.php

return [
  //define who the text message sender address is
  'from' => '',
Supported Cell Phone Providers

All Options Defined In: config/gateway.php

'options' => [
    'US Cellular', 
    'Boost Mobile', 
    'Virgin Mobile'
Supported Gateways

pms sms

Sending Custom Text Messages With Laravel Mailable Objects

$user = App\User::create(['email' => '', 'password' => 'secret', 'name' => 'johnDoe']);

// register phone number to user
$user->isTextableVia('Virgin Mobile')->at('5555555555');

// Send a message with a custom mailable instance
$user->text()->message(new MailableInstance($info));