norman-huth/laravel-email-log
最新稳定版本:1.0.4
Composer 安装命令:
composer require norman-huth/laravel-email-log
包简介
README 文档
README
Save sent emails in the database.
If there is an authenticated user while sending a mail, it will be saved as authenticatable (polymorphic relation).
Install
composer require norman-huth/laravel-email-log
Optional: Publish
Publish config file
php artisan vendor:publish --provider="NormanHuth\LaravelEmailLog\Providers\PackageServiceProvider" --tag="email-log-config"
Publish Migration
php artisan vendor:publish --provider="NormanHuth\LaravelEmailLog\Providers\PackageServiceProvider" --tag="email-log-migrations"
Usage
It’s a Laravel Eloquent Model.
use NormanHuth\LaravelEmailLog\Models\EmailLog::class; return EmailLog::all(); return EmailLog::find(1); return EmailLog::find(1)->authenticatable;
Laravel Nova
For a Laravel Nova integration read NOVA.md
Model
ErrorLog = { 'id': Number, 'subject': String, 'body': String, 'from': Array, 'to': Array, 'bbc': Array, 'cc': Array, 'reply_to': Array, 'headers': Array, 'attachments': Array, 'is_html': Boolean, 'priority': Number, 'authenticatable_type': String|Null, 'authenticatable_id': Number|Null, 'created_at': String|Null, 'updated_at': String|Null, 'deleted_at': String|Null }
Model Relationship
Nullable morph.
/** * Get the parent authenticatable model. */ public function authenticatable(): MorphTo { return $this->morphTo(); }
SoftDeletes
The softDeletes column is present in the migration, but the SoftDeletes Trait is not using by the Model.
统计信息
- 总下载量: 770
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-19