gabrieliuga / laravel-mail-log

MIT License
4 stars 2 forks source link

#2 save occurred entities #7

Closed 4n70w4 closed 4 years ago

4n70w4 commented 4 years ago

Added 2 polymorphic relations to mail_log table.

Usage:

1) php artisan migrate

2) add Occurrable trait to your Mailable mails

use Giuga\LaravelMailLog\Traits\Occurrable;

3) Bind entities on mail send;

$mail->occurred($payment);

or

$mail->occurred($payment, $order);

or

$mail->occurred(null, $order);

and send

Mail::to($contacts)->send($mail);
4n70w4 commented 4 years ago

https://github.com/gabrieliuga/laravel-mail-log/issues/2