Sending SMS with Nexmo in Laravel

Last Updated: December 20, 2017

In this tutorial I am going to discuss how to send SMS using Nexmo.

First you have to sign up in Nexmo website and you can use your free account for testing

Then you can install the PHP client library using Composer

composer require nexmo/laravel

You can add Nexmo\Laravel\NexmoServiceProvider to the providers array in your config/app.php

'providers' => [

 // other code 

In your .env file. You can put the key and secret


Now you can create route in routes\web.php file

Route::get('/sms', 'SMSController@send');

In your SMSController, you can put the following code to send SMS

 public function send(){
    	'to'   => '000773524056',
    	'from' => '16105552344',
    	'text' => 'Using the facade to send a message.'

Now you can send the SMS using following URL

You can see the SMS like this in your phone

IMG 1008