Serialization of closure failed: Serialization of 'Illuminate\Http\UploadedFile' is not allowed

Posted 3 months ago by Van1310

public function multiplemailsend(Request $request)

{        

      $stream=$request->get('stream_name');

      

      $array=([

          'title'=>$request->title,

          'body'=>$request->body, 

          'file'=>$request->file,           

      ]);

              

      $data=Registration::where('stream_id','=',$stream)->pluck('email');          



      foreach($data as $datas)

      \Mail::queue('email.email', ["name" => "vandan"], function($message) use($datas,$array)

      {              

          $message->to($datas)->subject($array['title']);

          $message->setbody($array['body']);

          $message->attach($array['file']);             

      });      

      return "Multiple Mail Send Successfully....";

}

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.