I'm passing some data to email view. But when I execute Mail::queue() ,It shows following error in terminal when I check with
php artisan queue:listen.
Following error showing in terminal
Argument 1 passed to Illuminate\Queue\Jobs\Job::resolveAndFire() must be of the type array, integer given, called in /home/aamir/project1/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php on line 50 and defined
Controller Code
$feedbacklink = url() . '/survey/' . $randomstring;
$email_data = array(
'name' => "$getbuyername",
'email' => "$getbuyeremail",
'inspector' => "$inspectorname",
'files' => $list,
'link' => $feedbacklink,
'para1' => "$para1",
'address' => "$reportaddress"
);
Mail::queue('emails.frontendreportfeedback', $email_data, function($message) use ($email_data) {
$message->from('abc@gmail.com', 'MyProject');
$message->to($email_data['email'])->subject('Feedback Wanted for '.$email_data['address']);
});
Email View
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Feedback Email</title>
</head>
<body style="font-family:Arial, Helvetica, sans-serif; font-size:16px;">
<p></p>
<p>Please provide your opinion via a very very short survey</p>
<p></p>
<p>Here are the list of files uploaded.</p>
@if(isset($files) && !empty($files))
<ul>
@foreach($files as $file)
<li> <a href=""></a> </li>
@endforeach
</ul>
@endif
Thank you
I'm new to laravel, Any help is much appreciated.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire