ghadeer/lara-mail-preview
最新稳定版本:v1.1
Composer 安装命令:
composer require ghadeer/lara-mail-preview
包简介
Preview mailable in browser while development.
README 文档
README
Laravel Mail Preview
A Laravel package that allows you to preview and customize mailables directly from the browser. It scans your Laravel project for mail classes, displays them in a dropdown, and allows you to input constructor parameters. When the fields are filled, the package renders the email template as HTML for preview.
Features
- Scans the
App/Maildirectory for available mail classes. - Displays mail classes in a dropdown when visiting the
/mail-previewroute. - Displays constructor parameters for each selected mail class.
- Automatically detects if a constructor parameter is a Model or Enum:
- If it's a Model (e.g.,
App\Models\User), a dropdown to select an existing record is generated. - If it's an Enum, a dropdown with all available enum options is shown.
- If it's a Model (e.g.,
- Renders the mail's Blade file as HTML once all required parameters are filled and submitted.
Installation
Step 1: Install via Composer
Run the following command to install the package via Composer:
composer require ghadeer/lara-mail-preview
Images
Select mail class:
Fill the fields:
See result:
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-28


