Tim Lytle of Nexmo demoing at Laracon US

Nexmo at Laracon (and in Laravel 5.3)

Published July 29, 2016 by Tim Lytle

We’ve had a blast at LaraconUS this week. If you’re here, and haven’t stopped by the booth, time’s running out!

Laravel 5.3 Notifications

Wednesday, Taylor closed the day with a preview of things to look for in Laravel 5.3. One of those things was the Notifications, and we were pleasantly surprised to find a Nexmo channel included.


Laravel Notifications allow you to deliver preconfigured notifications to users – things like welcome messages, or account alerts. Those notifications can be delivered using one or more channels, depending on the array your ‘notifiable’ object returns from its via() method. Email is an obvious channel, but for critical messages it’s hard to beat SMS.

If you want to take the NexmoSmsChannel for a spin, just add a few configuration details to your services.php config:

Oh, you want to know how to define your message, and make an object notifiable? Well, you should have been there for the talk. 🙂 If I were you, I’d poke around this post, and the code a bit.

Nexmo Laravel Package

If you want to do more than send outbound notifications, we’ve also put together a simple Laravel Service Provider to give you quick access to our PHP Client Library.

Because the client library itself is still in beta, the best way to play with it is to add it to composer.json along with the Laravel Package:

If you’re not just playing with it, you should lock the client to the latest beta release:

Once composer update does its thing, you can add Nexmo\Laravel\NexmoServiceProvider to the providers array in your config/app.php. Want a Facade? Got one of them, just add this to the alias array:

Take a look at the package README for more details, and the client library README for how to interact with our API.

Duct Tape Demos

Friday, we had a couple of minutes on stage to talk about Nexmo, so I used all of the Laravel knowledge I had acquired over the last week to throw together a simple and ridiculous demo. Simple because I basically just know how to edit routes.php. Ridiculous because whenever you let a large crowd of people send text messages to your screen, they ignore everything you say.

The idea was to take ‘advice’ in a form like “When you’re in London, bring an umbrella.” Then with a simple explode() on that comma, take all that advice and mix it randomly, sending to everyone that sent some. If you want to take a look, you can find the code someplace on the internet.


Oh, you want to know what SMS people sent the demo? Things like this:

Caught Pikachu get at me

Of course this:

(╯°□°)╯︵ ┻━┻

And from someone playing #LaraconBingo:



Now What?

I’d love for you to take a look at the new Nexmo Laravel Package, give the API and the PHP client library a try, and tell me what you think. Is it easy to use? Is there something we can do better? Let me know on github.

And #laracon – thanks for having us!

Title image credit curtosy of Laravel News

Nexmo Logo

Leave a Reply

Your email address will not be published.

Get the latest posts from Nexmo’s next-generation communications blog delivered to your inbox.

By signing up to our communications blog, you accept our privacy policy , which sets out how we use your data and the rights you have in respect of your data. You can opt out of receiving our updates by clicking the unsubscribe link in the email or by emailing us at privacy@nexmo.com.