Skip to content

mattjamesvogt/laravel-nova-email-log

 
 

Repository files navigation

Adds an Email Log resource so that you can see all outgoing emails from your app.

Latest Version on Packagist Build Status Quality Score Total Downloads

Logs all outbound emails to the database, and allows you to view them in Laravel Nova.

Demo

Installation

You can install the package via composer:

composer require cloudest-co/laravel-nova-email-log

Add to your NovaServiceProvider

    /**
     * Get the tools that should be listed in the Nova sidebar.
     *
     * @return array
     */
    public function tools()
    {
        return [
            new \Cloudest\NovaEmailLog\NovaEmailLog,
        ];
    }

Relationships

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),
        ];
    }

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Beautiful email logs for your nova application

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 75.6%
  • Blade 22.5%
  • JavaScript 1.9%