Hello friends, I have a problem with only one line of code that no matter how hard I search, I did not find any solution.
Use laravel: 5.6 Mysql-MariaDB
I have this:
And in the part of $message->$usuario->email
that is to the user that the mail will be sent. I get this error attached below the code
public function restoremail(Request $request)
{
$correo=DB::table('usuarios')
->where('email', '=', $request->get('email'))
->get();
if(count($correo) > 0)
{
$usuario=Usuarios::findOrFail($correo[0]->id_usu);
$data = array(
'contrasena'=>$usuario->contrasena,
);
Mail::send('emails.restore', $data, function($message){
$message->from('[email protected]','Helle Mexico Team');
$message->to($usuario->email)->subject('Mensaje de prueba helloteam');
});
return view('Home.principal');
}
else
{
return view('error');
}
In what way can I make the user enter his mail so that he can see his password in his inbox, and re-decal only that part where the system has to take the mail, thanks for your help!