DEV Community

Yasser Elgammal
Yasser Elgammal

Posted on

Introducing Lara SMS – A Flexible Laravel SMS Gateway Package

I’m excited to introduce my new Laravel package, Lara SMS, designed to make SMS integration in Laravel projects easier, cleaner, and more flexible.


💡 Why Lara SMS?

Integrating SMS gateways can often be repetitive and inconsistent across projects.
Lara SMS provides a unified and expressive API that allows you to send messages through multiple gateways, all while keeping your codebase elegant and maintainable.


⚙️ Key Features

✅ Multi-provider support
Built using the Strategy Pattern, allowing seamless integration with multiple SMS gateways.

✅ Fluent Builder
Provides a clean and expressive syntax for message construction using a chainable, fluent interface.

✅ Fallback Strategies
Choose between “Try All” or “Fail Fast” approaches when handling failed gateway attempts.

✅ Automatic Retries
Automatically retries sending messages on temporary failures to ensure reliability.

✅ Comprehensive Logging
Tracks and logs all SMS operations for better monitoring and debugging.


🧩 Installation

Install the package via Composer:

composer require yasser-elgammal/lara-sms
Enter fullscreen mode Exit fullscreen mode

🧠 Behind the Scenes

This project taught me a lot about designing scalable and extendable Laravel packages, particularly around architectural design patterns like Strategy and Builder.

My goal was to create something that’s both powerful and developer-friendly, making SMS workflows in Laravel projects smoother than ever.

🔗 GitHub:
https://github.com/yasserelgammal/lara-sms


💬 Feedback Welcome

I’m always open to feedback, ideas, and contributions.
If Lara SMS helps simplify your workflow or if you have suggestions for improvement, I’d love to hear from you!

Top comments (2)

Collapse
 
roshan_sharma_7deae5e0742 profile image
roshan sharma

Nice work! Super clean idea and love how you used the Strategy and Builder patterns makes SMS handling so much smoother. Curious though, which gateway did you test it with first?

Collapse
 
yasserelgammal profile image
Yasser Elgammal

Thanks! I started testing with Vonage and Infobip, both worked smoothly with the package structure.