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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -