javascript - Send Chart.js email with Laravel -
i'm using library https://github.com/fxcosta/laravel-chartjs generate graphics php variables. , after send chart email, unfortunately not possible send js email.
$chartjs = app()->chartjs ->name('linecharttest') ->type('line') ->size(['width' => 400, 'height' => 200]) ->labels(['-1', '-0.5', '0', '0.5', '1']) ->datasets([ [ "label" => "p(theta) emp", 'backgroundcolor'=> "blue", 'bordercolor' => "blue", 'fill' => "false", 'data' => $acerto_bruto, ], [ "label" => "p(theta) 0", 'backgroundcolor'=> "red", 'bordercolor' => "red", 'fill' => "false", 'data' => $theta0, ], [ "label" => "p(theta) 1", 'backgroundcolor'=> "orange", 'bordercolor' => "orange", 'fill' => "false", 'data' => $theta1, ], ]) ->options([]); $data = [ 'idquest' => $question->question_idquest, 'enunciation'=>$updatequestion->enunciation, 'url' =>$updatequestion->url, 'acerto_bruto' => $acerto_bruto, 'theta0' => $theta0, 'theta1' => $theta1, 'sqrt_error_zero' => $sqrt_error_zero, 'sqrt_error_one' => $sqrt_error_one, 'old_a' => $old_a, 'old_b' =>$old_b, 'old_c' =>$old_c, 'value_alpha' => $value_alpha, 'value_beta' => $value_beta, 'value_c' => $value_c, 'chartjs' => $chartjs, 'subject' => 'calibragem tri versao 0', ]; mail::send('mails.calibrate', $data, function($message) use ($data) { $message->to('myemail'); $message->subject($data['subject']); });
so, need send graphs view.
Comments
Post a Comment