Я получаю ошибку, что переменная $ recipient не определена в laravel.переменная foreach undefined в laravel
public function sendEmail($input, $recipients){
foreach($recipients as $recipient){
$student = StudentInfo::where('email', '=', $recipient)->first();
Mail::queue('emails.outMail', array('letter' => $input['dept_message']), function($message){
$message->to($recipient, $student->first_name)->subject($input['dept_subject']);
});
}
}
Добавить полный след ошибки. – iamawebgeek