定制 ghadeer/lara-mail-preview 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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/Mail directory for available mail classes.
  • Displays mail classes in a dropdown when visiting the /mail-preview route.
  • 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.
  • 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:

Dropdown to select mailable

Fill the fields:

Fields

See result:

Result

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-28