jeremykenedy/laravel-email-database-log

A database logger for all outgoing emails sent by your Laravel application.

v11.5.0 2023-02-27 01:48 UTC

This package is auto-updated.

Last update: 2024-05-06 10:36:10 UTC


README

A database logger for all outgoing emails sent by your Laravel application.

Total Downloads StyleCI License: MIT Become a Patreon

Table of contents

Requirements

Installation Instructions

  1. From your projects root folder in terminal run:

        composer require jeremykenedy/laravel-email-database-log
  2. Register the package

  • Laravel 5.5 and up Uses package auto discovery feature, no need to edit the config/app.php file.

  • Laravel 5.4 and below Register the package with laravel in config/app.php under providers with the following:

    'providers' => [
        // ...
        jeremykenedy\LaravelEmailDatabaseLog\LaravelEmailDatabaseLogServiceProvider::class,
    ];
  1. Publish the packages migration files by running the following from your projects root folder:
php artisan vendor:publish --tag=laravel-email-database-log-migration
  1. From your projects root folder in terminal run the migration:
php artisan migrate

Usage

After installation, any email sent by your application will be logged to email_log table in the site's database.

File Tree

laravel-email-database-log
├── .all-contributorsrc
├── .github
│ └── workflows
│     └── master.yml
├── .gitignore
├── .styleci.yml
├── LICENSE.md
├── README.md
├── composer.json
├── composer.lock
├── phpunit.xml
└── src
    ├── Database
    │ └── Migrations
    │      └── 2023_02_26_001638_create_email_log.php
    ├── EmailLogger.php
    ├── LaravelEmailDatabaseLogEventServiceProvider.php
    └── LaravelEmailDatabaseLogServiceProvider.php
  • Tree command can be installed using brew: brew install tree
  • File tree generated using command tree -a -I '.git|node_modules|vendor|storage|tests'

License

Laravel Email Database Log is licensed under the MIT license. Enjoy!