Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Van der Herten:
Sending a welcome mail with Laravel 5.3
Oct 04, 2016 @ 16:15:35

Freek Van der Herten has posted a new tutorial to his site showing you a method for sending a "welcome" email for your Laravel (5.3) application using the recently added "mailables" functionality.

Recently I was working an a project where, in order to use the webapp, users should first apply for an account. Potential users can fill in request form. After the request is approved by an admin they may use the app.

Our client expected that the barrier to request an account should be very low. That’s why the request form doesn’t contain a password field. Instead, when an account is approved, a welcome mail is sent with a link to where the user can specify a password.

In this post I’d like to show you how we solved this with Laravel 5.3’s mailables.

He starts with a high level overview of what he's trying to accomplish: sending the approval when the admin approves a new user in the system. He includes all the code you'll need to create:

  • the "approve" method in the User model
  • the event handler for the "UserApproved" event
  • generating the password reset hash/token
  • the actual code for the mailable class to send the message

He also includes the view for the email's contents, a simple "WelcomeController" to handle the user responding to the message and the view for the verification and password reset "welcome" page.

tagged: laravel tutorial send welcome email approval mailable event

Link: https://murze.be/2016/10/sending-welcome-mail-laravel-5-3/

TutsPlus.com:
Building a Welcome Page for Your WordPress Product: Code Part 1
Sep 23, 2016 @ 15:33:58

TutsPlus.com has started off a new series of posts for the WordPress users out there showing you how to build a "welcome page" for your WordPress site and product.

In the first two articles of this series, I wrote about what welcome pages are and how they are helping products improve user experience by connecting the dots, after which I wrote about the WordPress Transients API that I intend to use while building the welcome page.

Coding a welcome page for your WordPress plugin can be a tricky process. The entire concept revolves around redirecting users to a particular page via setting transients and finally deleting them. Let's start building the welcome page.

They walk you through the creation of a simple plugin that can be used to easily create (and re-create) these "welcome" pages (the final result is here for the impatient). The tutorial the starts off by defining the architecture of the plugin and the workflow that it will follow to generate the page. From there it gets into the code for the plugin itself and related supporting files including the "initializer" that activates the plugin, making it ready for use.

tagged: welcome page wordpress plugin series part1 tutorial

Link: https://code.tutsplus.com/articles/building-a-welcome-page-for-your-wordpress-product-code-part-1--cms-26014


Trending Topics: