SHARE
TWEET

Untitled

a guest Jul 19th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $userArray = $user->toArray();
  2.  
  3.     // Create reset token
  4.     $table = 'myapp.password_resets';
  5.     $key = config('app.key');
  6.     $hash = Hash::make($data->id);
  7.  
  8.     $dbRepo = new DbRepository(DB::connection(), null, $table, $key, 60);
  9.     $token = $dbRepo->create($user);
  10.  
  11.     $emailData = array(
  12.       'name'  => $userArray['name'],
  13.       'email' => $userArray['email'],
  14.       'token' => $token,
  15.       'admin_name' => Auth::user()->name,
  16.       'entity_name' => session('entity_name')
  17.     );
  18.  
  19.     Mail::send('auth.emails.invite', $emailData, function ($message) use ($user) {
  20.       $message->to($user->email)->subject('You have been invited to use myApp!');
  21.     });
  22.  
  23.     return '';
  24.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top