Laravel Mail: Undifine variable $data -
Laravel Mail: Undifine variable $data -
my controller generates info array:
array ( [bothweek] => array ( [0] => 2014-10-26 [1] => 2014-10-19 ) [projects] => array ( [0] => stdclass object ( [day_name] => quarta-feira [project_date] => 2014-10-22 [invoiced_date] => 2014-10-31 [week_end_day] => 2014-10-26 [user_name] => john ) ) ) but when seek send mail service blade, not recognize array, can please give me solution, give thanks you,
mail::send('project.mail', $data, function ($message) { $message->from('email', 'abc'); $message->to('send'); });
if want $data accessible in view file project.mail need utilize ['data' => $data] sec argument, otherwise 2 variables, $bothweek , $projects.
mail::send('project.mail', ['data' => $data], function ($message) { ... }); laravel laravel-4
Comments
Post a Comment