Logs all outbound emails to the database, and allows you to view them in Laravel Nova.
You can install the package via composer:
composer require cloudest-co/laravel-nova-email-log
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [
new \Cloudest\NovaEmailLog\NovaEmailLog,
];
}
Add the trait to your user model so that you can reference the logs.
<?php
use Cloudest\LaravelEloquentEmailLog\HasEmailLogs;
class User extends Authenticatable
{
use HasEmailLogs;
...
}
Add the relation to your Nova User resource so that you can see a list of email logs per user.
/**
* Get the fields displayed by the resource.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function fields(Request $request)
{
return [
...
MorphMany::make('Email Logs', 'emailLogs', \Cloudest\NovaEmailLog\EmailLogResource::class),
];
}
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.