Closed 4n70w4 closed 4 years ago
Added 2 polymorphic relations to mail_log table.
mail_log
occurredProcess - parent entity consisting of small entities, example, order and other long processing pipelines.
occurredProcess
occurredEntity - child entity, example, payment of order, delivery of order, refund of order, etc.
occurredEntity
Usage:
1) php artisan migrate
php artisan migrate
2) add Occurrable trait to your Mailable mails
Occurrable
Mailable
use Giuga\LaravelMailLog\Traits\Occurrable;
3) Bind entities on mail send;
$mail->occurred($payment);
or
$mail->occurred($payment, $order);
$mail->occurred(null, $order);
and send
Mail::to($contacts)->send($mail);
https://github.com/gabrieliuga/laravel-mail-log/issues/2
Added 2 polymorphic relations to
mail_log
table.occurredProcess
- parent entity consisting of small entities, example, order and other long processing pipelines.occurredEntity
- child entity, example, payment of order, delivery of order, refund of order, etc.Usage:
1)
php artisan migrate
2) add
Occurrable
trait to yourMailable
mails3) Bind entities on mail send;
or
or
and send