Van1310
130
1
Laravel

Illegal offset type while mail send

Posted 3 months ago by Van1310

error in mail send here is my controller file

$mail=Registration::select('email')->first();
    $date=Carbon\Carbon::now();

$data = [
        
    'branch' => $request->branch,
            'student_name' => $request->student_name,
            'joining_date' => $request->joining_date,
            'reporting_time' => $request->reporting_time
      ];

 \Mail::send('email.confirmation', $data, function($message) use ($mail,$date,$data){
            $message->to($mail)->subject('Welcome to Byte and Bits Team.');
        });

confirmation blade file

    {{$student_name}}
    {{$joining_date}}
    {{$reporting_time}}

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