labomatik/lob

Lob.com notifications channel for Laravel 5.3
3,347 1
Install
composer require labomatik/lob
Latest Version:1.2.8
PHP:>=7.2.5
License:MIT
Last Updated:Aug 12, 2026
Links: GitHub  ·  Packagist
Maintainer: labomatik

Lob.com notifications channel for Laravel

Forked from laravel-notification-channels, adding back and Merge Variable for new Lob API

This package makes it easy to send notifications using Lob.com with Laravel 5.5, 6.x and 7.x

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/lob

You must install the service provider:

// config/app.php
'providers' => [
    ...
    NotificationChannels\Lob\LobServiceProvider::class,
],

Setting up lob

  • Register a new account on Lob.com
  • Check for you API keys
  • Finally add your API key to your config/services.php
// config/services.php
...
'lob' => [
    'api_key' => env('LOB_API_KEY'),
],
...

Usage

Now you can use the channel in your via() method inside the notification:

use NotificationChannels\Lob\LobChannel;
use NotificationChannels\Lob\LobPostcard;
use NotificationChannels\Lob\LobAddress;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [LobChannel::class];
    }

    public function toLobPostcard($notifiable)
    {
        return LobPostcard::create()
            ->toAddress(
                LobAddress::create('300 BOYLSTON AVE E')
                    ->name('John Smith')
                    ->city('SEATTLE')
                    ->state('WA')
                    ->zip('98002');
            )
            ->front('https://path.to/my/image/postcardfront.png')
            ->message('Wishing you a wonderful weekend!');
    }
}

Available Postcard methods

  • fromAddress() Address of the sender.
  • toAddress() Address of the receiver.
  • country() Set the country. US is default.
  • city() required if country is US.
  • state() required if country is US.
  • zip() required if country is US.
  • front() A 4.25"x6.25" or 6.25"x11.25" image to use as the front of the postcard.
  • message() The message at the back of the card.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email themsaid@gmail.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

637,827,751 9,703
laravel/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

498,216,183 7,442
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

413,412,504 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
1.2.8 >=7.2.5 ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
1.2.7 >=7.2.5 ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
1.2.6 >=7.2.5 ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ^10.0 || ^11.0 || ^12.0 MIT
1.2.5 >=7.2.5 ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ^10.0 || ^11.0 MIT
1.2.4 >=7.2.5 ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 MIT