Package

Michal78 Laravel Sms Catcher

A development-only inbox for inspecting Laravel SMS notifications.

Package

michal78/laravel-sms-catcher

View on GitHub →

Laravel SMS Catcher

A development-only Laravel package that captures SMS notifications and displays them in a beautiful, phone-inspired inbox – think Mailpit, but for your sms notification channel.

Screenshots

SMS Inbox Dashboard

SMS Catcher inbox showing a list of captured messages, light mode SMS Catcher inbox showing a list of captured messages, dark mode

The main inbox view displays all captured SMS messages with sender, recipient, and timestamp information, and supports light/dark themes.

Message Detail View

SMS message detail view with phone-style preview

Click any message to see the full details alongside a phone-style preview (with a device selector), making it easy to verify how your SMS will appear to recipients.

Requirements

  • PHP 8.2+
  • Laravel (illuminate/support and illuminate/notifications) 10.x, 11.x, 12.x, or 13.x

Installation

Require the package in your application as a dev dependency. Until a tagged release is published you will need to target the dev-main branch explicitly:

composer require --dev michal78/laravel-sms-catcher

The package is auto-discovered by Laravel, but you can manually register the service provider if you have discovery disabled:

// config/app.php
'providers' => [
    // ...
    SmsCatcher\SmsCatcherServiceProvider::class,
];

Configuration

By default the dashboard is only enabled when your application is running in the local environment or when APP_DEBUG=true. You can override this behaviour via the SMS_CATCHER_ENABLED environment variable.

Publish the configuration file if you would like to customise the dashboard path or storage location:

php artisan vendor:publish --tag=sms-catcher-config

This will create config/sms-catcher.php with the following options:

  • enabled: Toggle the catcher on/off.
  • route.prefix: URL prefix for the dashboard (defaults to /sms-catcher).
  • route.middleware: Middleware stack wrapping the dashboard routes.
  • storage_path: File that stores captured messages.

Usage

Trigger any Laravel notification that uses the sms channel and the payload will be recorded automatically. Visit the dashboard (default at http://your-app.test/sms-catcher) to see the inbox:

  • Inbox view summarises each message.
  • Click a message to view details and a phone-style preview.
  • Clear individual messages or wipe the entire inbox.

Messages are stored as JSON within your application's storage folder (storage/logs/sms-catcher.json). The file is safe to delete; it will be recreated as new messages arrive. Since the storage/logs directory is typically excluded from version control in Laravel applications, the captured messages will not be committed to your repository.

Note: The catcher inspects notifications by invoking their toSms method. Ensure your notifications implement this method and return either a string, array, or object containing the text body.

Security

This package is intended for local development only. Do not enable it in production environments.

Development

Install dependencies and run the test suite, code style checks, and static analysis locally:

composer install
composer test          # PHPUnit
composer format:test   # Laravel Pint (--test)
composer format         # Laravel Pint (auto-fix)
composer analyse        # PHPStan / Larastan

These same checks run automatically on every push and pull request via GitHub Actions (see .github/workflows).

Changelog

Please see CHANGELOG.md for recent changes.

Contributing

Issues and pull requests are welcome. Please run composer test, composer format:test, and composer analyse before submitting a PR.

License

The MIT License (MIT). Please see LICENSE for more information.

Michal78 Laravel Sms Catcher Related Articles

Laravel SMS Catcher: A Local Dashboard for SMS Notifications image

Laravel SMS Catcher: A Local Dashboard for SMS Notifications

Read article
Sending and Receiving SMS with Laravel and Nexmo image

Sending and Receiving SMS with Laravel and Nexmo

Read article
Sending and receiving SMS Laravel Notifications with Nexmo image

Sending and receiving SMS Laravel Notifications with Nexmo

Read article
Laravel Notifications – Easily send quick updates through Slack, SMS, Email, and more image

Laravel Notifications – Easily send quick updates through Slack, SMS, Email, and more

Read article
Text-To-Speech calls with Laravel and Nexmo image

Text-To-Speech calls with Laravel and Nexmo

Read article
Real-time messaging with Nexmo and Laravel image

Real-time messaging with Nexmo and Laravel

Read article

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum