jeremykenedy / laravel-email-database-log
A database logger for all outgoing emails sent by your Laravel application.
Installs: 8 750
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 4
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^8.0.2|^8.1|^8.2
- doctrine/dbal: ^3.6
- illuminate/support: ^8.5|^9.0|^10.0
- nesbot/carbon: ^2.66
Requires (Dev)
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^10.0
- suin/phpcs-psr4-sniff: ^3.0
README
A database logger for all outgoing emails sent by your Laravel application.
Table of contents
Requirements
Installation Instructions
-
From your projects root folder in terminal run:
composer require jeremykenedy/laravel-email-database-log
-
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
underproviders
with the following:
'providers' => [ // ... jeremykenedy\LaravelEmailDatabaseLog\LaravelEmailDatabaseLogServiceProvider::class, ];
- Publish the packages migration files by running the following from your projects root folder:
php artisan vendor:publish --tag=laravel-email-database-log-migration
- 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!