1. Go to this page and download the library: Download cleaniquecoders/mailhistory 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/ */
cleaniquecoders / mailhistory example snippets
namespace App\Mail;
use CleaniqueCoders\MailHistory\Concerns\InteractsWithMailMetadata;
class DefaultMail extends Mailable
{
use InteractsWithMailMetadata, SerializesModels;
public function __construct()
{
$this->configureMetadataHash();
}
use CleaniqueCoders\MailHistory\Concerns\InteractsWithMail;
class DefaultNotification extends Notification
{
use InteractsWithMail;
public function __construct()
{
$this->setMail(
new \App\Mails\DefaultMail
);
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): Mailable
{
return $this->getMail()->to($notifiable->email);
}