1. Go to this page and download the library: Download labomatik/lob library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
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!');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.