antriver/laravel-simple-message-trait is a Laravel package.
It currently has 0 GitHub stars and 125 downloads on Packagist (latest version 5.8.15).
Install it with composer require antriver/laravel-simple-message-trait.
Discover more Laravel packages by antriver
or browse all Laravel packages to compare alternatives.
Last updated
Laravel provides a SimpleMessage class for mail representation of notifications (https://github.com/laravel/framework/blob/5.8/src/Illuminate/Notifications/Messages/SimpleMessage.php) but sometimes you want to use this nice interface on a regular Mailable instance. This package is simply a copy and paste of the SimpleMessage class but as a trait instead of a class.
composer require antriver/laravel-simple-message-trait
<?php
namespace MySite\Mail;
use Antriver\LaravelSimpleMessageTrait\SimpleMessageTrait;
use Illuminate\Mail\Mailable;
abstract class MyCoolMailable extends Mailable
{
use SimpleMessageTrait;
// ...
}
The with($line) method has been removed from the trait because that conflicts with the with($key, $value = null) method on Mailable. Instead you can use line($line) which does the same thing.