| Package Data | |
|---|---|
| Maintainer Username: | laravel-notification-channels |
| Maintainer Contact: | themsaid@gmail.com (Mohamed Said) |
| Package Create Date: | 2016-08-14 |
| Package Last Update: | 2020-10-25 |
| Home Page: | http://laravel-notification-channels.com |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-18 15:06:57 |
| Package Statistics | |
|---|---|
| Total Downloads: | 450 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 11 |
| Total Watchers: | 1 |
| Total Forks: | 10 |
| Total Open Issues: | 2 |
This package makes it easy to send notifications using Lob.com with Laravel 5.3.
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,
],
config/services.php
// config/services.php
...
'lob' => [
'api_key' => env('LOB_API_KEY'),
],
...
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!');
}
}
fromAddress() Address of the sender.toAddress() Address of teh receiver.country() Set the country. US is default.city() required if city is US.state() required if city is US.zip() required if city 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.Please see CHANGELOG for more information what has changed recently.
$ composer test
If you discover any security related issues, please email themsaid@gmail.com instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.