I m new to laravel.i have table email_template and want to send mail to user when user forgot password.i m fetching content dynamically from database but i dont know how to pass it to mail function in laravel.
Mail::send($posts['email_template'], ['USER' =>$post['user] ], function($message) {
$message->from('[email protected]')->subject('Welcome to laravel');
$message->to('[email protected]');
});
where $posts['email_template'] is a content which i want to send and user is a variable which i want to replace in content