title: Passing data to a closure in Laravel 4
body: <p>I'm trying to use the Mail Class in Laravel 4, and I'm not able to pass variables to the $m object.</p>
  <p>the $team object contains data I grabbed from the DB with eloquent.</p>
  <pre><code>Mail::send('emails.report', $data, function($m)
  {
     $m-&gt;to($team-&gt;senior-&gt;email, $team-&gt;senior-&gt;first_name. ' '. $team-&gt;senior-&gt;last_name );
     $m-&gt;cc($team-&gt;junior-&gt;email, $team-&gt;junior-&gt;first_name. ' '. $team-&gt;junior-&gt;last_name );
     $m-&gt;subject('Monthly Report');
     $m-&gt;from('info@website.example', 'Sender');
  });
  </code></pre>
  <p>For some reason I get an error where $team object is not available. I suppose it has something to do with the scope.</p>