shaz3e/email-templates

A demo package

v1.0.2 2024-11-21 17:40 UTC

This package is auto-updated.

Last update: 2024-11-21 17:43:12 UTC


README

Packagist Version Packagist Downloads License Laravel Version

Email templates are pre-designed email messages that can be customized to fit your needs. They can be used to send automated emails, such as welcome emails, abandoned cart reminders, and order confirmations all emails will written in html and queueable mean there is no need to create additional jobs or mailable everytime for all your email and best thing is you can write your own email from dashboard and use template placeholders like {{ name }} in your email but you need to register placeholders in the specific email.

Before proceeding the installation steps please read the complete documention to take only the step which is necessary for your application. We suggest only publish config file as this may be necessary to manage prefix, routes and middleware and only publish views when you need to modify it. It built with livewire grid view which poll data only visible mode.

Note This package is built for S3 Dashboard and require extra efforts to use with any laravel application.

Install via composer

composer require shaz3e/email-templates

Publish migration only

php artisan vendor:publish --tag=email-templates-migration

Migrate database and permissions

php artisan migrate
php artisan storage:link

Create template from dashboard visit http://s3-dashboard.test/manage/email-templates/create

Create Template from Console

php artisan email-templates:create
  • Provide Unique Template Key
  • Provide Template Name
  • Provide Email Subject

Or create all together

php artisan email-templates:create "key" "name" "subject"

replace key, name, subject according to your requirements

To send email use the following function in your application or preview/view the template and use the code at the end of show route

use Shaz3e\EmailTemplates\Services\EmailService;

$emailService = new EmailService();
$emailService->sendEmailByKey('{template_key}', $user->email, [
    'name' => $user->name,
    'email' => $user->email,
]);

Publisables

Publish config only

php artisan vendor:publish --tag=email-templates-config

Publish views only

php artisan vendor:publish --tag=email-templates-view

Publish language files only

php artisan vendor:publish --tag=email-templates-lang

Or Publish everything

php artisan vendor:publish --tag=email-templates-all

Contributing

License

Email Templates with S3 Dashboard is licensed under the MIT license. Enjoy!

Credit

GitHub commit activity

GitHub Stats

GitHub Contributions Graph