Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel run function after forgot password

*Create Listener in 'AppListeners'

<?php

namespace AppListeners;
use AppPasswordHistory;
use IlluminateAuthEventsPasswordReset;

class ResetPasswordListener
{
    public function handle(PasswordReset $passwordReset)
    {
        $passwordHistory = PasswordHistory::create([
            'user_id' => $passwordReset->user->id,
            'password' => $passwordReset->user->password
        ]);
    }
}

*Add this to $listen in 'AppProvidersEventServiceProvider.php'
  
  'IlluminateAuthEventsPasswordReset' => [
    'AppListenersResetPasswordListener'
  ]
Comment

PREVIOUS NEXT
Code Example
Php :: check box with value in php 
Php :: latest php version 
Php :: extract in php useful 
Php :: prefix laravel route 
Php :: php numeric array 
Php :: how to store wp editor in wordpress 
Php :: laravel + join 2 eloquent queries 
Php :: laravel debugbar ServiceProvider to the providers 
Php :: strip html tag php 
Php :: how to pass write post method in lumen 
Php :: laravel imap - Set message flags 
Php :: getDoctrine 
Php :: merge multiple exceptions php 
Php :: put_assoc 
Php :: facetwp listing template archive 
Php :: PHP strnatcasecmp — Case insensitive string comparisons using a "natural order" algorithm 
Php :: php ::class 
Php :: how to register a file in a config in laravel 
Php :: if order has product id in array 
Php :: PHP detect spam name 
Php :: tina4 save file to database in orm 
Php :: Undefined variable $argc $argv in PHP 
Php :: php domdocument get elements one by one 
Php :: php import 
Php :: laravel collection makeVisible 
Php :: extension gd missing laravel composer update 
Php :: wcfm filter vendor dashboard widgets 
Php :: Automatically downloading images from any URL location 
Php :: Installation request for pokemon-tcg/pokemon-tcg-sdk-php ^1.2 - satisfiable by pokemon-tcg/pokemon-tcg-sdk-php[1.2.0] 
Php :: php code inside html 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =