Laravel Episode 6: Password Reset and Email

episode 6

Episode 6: Password Reset and Email


  • Move Login/Logout link to the navbar
  • Add password help link to login page
  • Configure .env to work with
  • Add value to from so that there is a sent from value. Good idea to use env('FROM_EMAIL')
  • Modify route file with the following
// Password reset link request routes
Route::get('password/email', 'AuthPasswordController@getEmail');
Route::post('password/email', 'AuthPasswordController@postEmail');

// Password reset routes...
Route::get('password/reset/{token}', 'AuthPasswordController@getReset');
Route::post('password/reset', 'AuthPasswordController@postReset');
  • Review /Http/Controllers/Auth/PasswordController.php and add the following
use IlluminateHttpRequest;
use IlluminateMailMessage;
use IlluminateSupportFacadesPassword;

use DB;

protected $redirectTo = '/';

public function getEmail() {
	// code here

public function postEmail(Request $request) {
	// code here

public function getReset($token) {
	// code here
  • postReset() is already configured and does not need modification for this demo
  • Create view files
    • auth/password.blade.php
    • auth/reset.blade.php
    • emails/password.blade.php
  • Review /config/auth.php file. Look at the emails.password setting

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: