Code Monkey home page Code Monkey logo

laravel-email-templates's Introduction

laravel-mails

Laravel (Blade) Email Templates For membership and ecommerce sites.

Fully integrated with Laravel: Mailer, Language, Config and uses the blade template format for Laravel. Set content options from language system or config settings.

Easy to add to your current application, no need for complicated integration steps. Three Simple Integration Steps

Premium Version Available At XSCode

Foo

(click the banner above for premium version)

Screenshots

To Do

  • Welcome Message Template
  • Verify Email Template
  • Forgot Password Template
  • Order Placed Template
  • Order Shipped Template
  • Invoice Template
  • Payment Thank You Template
  • Feedback Request Template
  • Reminder Template

How to Install

Install this library on your application

composer require --dev simplepleb/laravel-email-templates

Automatically copy files and folders to the same structure within you Laravel application.

php artisan vendor:publish --provider=Pleb\\EmailTemplatesServiceProvider

If you'd like to copy only parts of the files, you can use tags.

php artisan vendor:publish --tag=pleb-email-templates-config    // to copy config files
php artisan vendor:publish --tag=pleb-email-templates-views     // to copy views files
php artisan vendor:publish --tag=pleb-email-templates-lang      // to copy lang files
php artisan vendor:publish --tag=pleb-email-templates-img       // to copy img files
php artisan vendor:publish --tag=pleb-email-templates-app       // to copy app files

Manually

Alternatively, you can copy the files yourself to your Laravel application.

    /config/pleb.php 
    /resources/views/email/*
    /resources/lang/en/pleb.php
    /public/assets/img/email/*
    /app/Mail/*

How to Use

  • Edit the values in config/pleb.php and /resources/lang/en/pleb.php

    Note: You only change the right-side values not the left-side variables

  • Make sure your /config/mail.php file has been updated to set the global from address etc.

    'from' => [
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'Example'),
    ],

Sending Welcome Message

From your controller simply call the mailable as you normally would. You can also send some optional variables as an array.

    use App\User;
    use App\Mail\WelcomeMember;

    $options = array(
        'unsubscribe_url'   => 'http://mysite.com/unsub',
        'play_url'          => 'http://google-play.com/myapp',
        'ios_url'           => 'http://apple-store.com/myapp',
        'sendfriend_url'    => 'http://mysite.com/send_friend',
        'webview_url'       => 'http://mysite.com/webview_url',
    );


    $user = User:find(1);
    Mail::to($user)->send(new WelcomeMember($user, $options));

Previewing these emails

If you would like to preview the emails before using them, copy the contents of the /routes/web.php to your version. Remember to remove these routes before launching your application.

Then open these URLS to view the template

  • /your.com/pleb/welcome_member
  • /your.com/pleb/verify_email
  • /your.com/pleb/forgot_password
  • /your.com/pleb/thanks_payment

Example route from routes/web.php

    Route::get('pleb/welcome_member', function () {
    
        $member = App\User::find(1);
        return new App\Mail\WelcomeMember($member);
    });

Screen Shots

Welcome Email

Full Size

Mobile View

Verification Email

Full Size

Mobile View

Forgot Password Email

Full Size

Mobile View

Thanks For Payment Email

Full Size

Mobile View

laravel-email-templates's People

Contributors

simplepleb avatar wesleygoncalves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-email-templates's Issues

Composer install not working

Hey there somehow the package is removed from the package list so we are not allowed anymore to install this package can you give us some support?

Composer unable to install

In Laravel 9 I get this error when trying to install:

Could not find a matching version of package simplepleb/laravel-email-templates. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (dev).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.